Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kvs inttest with beforeall #23

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Kvs inttest with beforeall #23

merged 2 commits into from
Feb 6, 2024

Conversation

kookubo
Copy link
Contributor

@kookubo kookubo commented Feb 6, 2024

コンストラクタが例外をthrowするようになっていたため、finalizer attackの問題がありました。

これらのコンストラクタは、JUnitテストでテストクラスの初期化処理(テスト用テーブル作成)をしていました。
JUnitのお作法に従い、コンストラクタではなく、@BeforeAll static void setup() throws Exception なメソッドに書き換えました。

テストクラスはTestBaseクラスを継承するのをやめ、Utils.createTable()などとstaticメソッドを呼び出すように変えました。

一時的に SpotBugsのチェックありとして、修正前は出たfinalizer attackの指摘が出なくなったことを確認しました。

@kookubo kookubo requested a review from t-horikawa as a code owner February 6, 2024 05:39
@kookubo kookubo merged commit 01fed44 into master Feb 6, 2024
2 checks passed
@kookubo kookubo deleted the kvs-inttest-with-beforeall branch February 6, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant