Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

refactor tests that depend(ed) on the Config enum being functional

オープン
#13,888 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@DaanHoogland がすでに取り組んでいます。

2026年8月18日 から。

評価

この issue はまだ評価されていません。

説明

type:technical-debt

some tests explicitely call on members of the Config enum to perform tests. refactor those tests so the enum can be phased out itself.

  1. Tests that mock ConfigurationDao.getValue(...) directly, where switching the production code to .value() would make the mock inert (since .value() reads from the static ConfigDepot, not the injected DAO):
  • ApiRateLimitServiceImpl.java's ApiLimitEnabled/ApiLimitInterval/ApiLimitMax/ApiLimitCacheSize reads — ApiRateLimitTest.java mocks these with a value ("true" for enabled) that diverges from the ConfigKey defaults, so skipping here isn't optional.
  • FirstFitPlanner.java's ImplicitHostTags read — FirstFitPlannerTest.java mocks it to "GPU", which also diverges from default.
  • ScaleIOPrimaryDataStoreDriver.java's MigrateWait read — deferred out of caution: ScaleIOPrimaryDataStoreDriverTest.java mocks it, and since ConfigKey's depot state is a static field, there's cross-test-pollution risk from other test classes (e.g. FirstFitPlannerTest) calling ConfigKey.init() in the same Surefire fork — not something to resolve with a coincidental "the mocked value happens to match the default" argument.
  • (ConfigurationManagerTest.java's ControlCidr and ActionEventUtilsTest/ActionEventInterceptorTest's PublishActionEvent were also mocked directly, but their mocked values matched the ConfigKey defaults exactly, so those were judged safe to migrate rather than deferred.)
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 20時間
マージ済み PR(30日)
27

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/cloudstack のほかの issue

apache/cloudstack の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。