Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#13,888 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@DaanHoogland y travaille déjà.

Depuis le 18/8/2026.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.)
Langage dominant
Java
Étoiles
3.1k
Forks
1.4k
Merge moyen
6 j 20 h
PR mergées (30 j)
27

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/cloudstack

Toutes les issues de apache/cloudstack

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.