adoptium / adoptium/api.adoptium.net
V3UpdaterTest not running as expected due to un-answered mocks
- Dominant language
- Kotlin
- Stars
- 44
- Forks
- 36
- Avg merge
- 5h 27m
- Merged PRs (30d)
- 42
Description
**Describe the bug**
V3UpdaterTest.kt test: "new update works", and also "exit is called when db not present" are failing with several MockKException: no answer found, eg:
```
2025-09-10 15:32:46,435 [io.moc.imp.rec.sta.AnsweringState] (main @coroutine#1010) Throwing io.mockk.MockKException: no answer found for APIDataStore(#172).loadDataFromDb(true, false) among the configured answers: (APIDataStore(#172).isConnectedToDb(any()))) on APIDataStore(#172).loadDataFromDb(true, false)
2025-09-10 15:32:46,435 [net.ado.api.v3.V3Updater$Companion] (main @coroutine#891) Failed to perform full update: io.mockk.MockKException: no answer found for APIDataStore(#172).loadDataFromDb(true, false) among the configured answers: (APIDataStore(#172).isConnectedToDb(any())))
```
"new update works" is actually just returning the same instance of repo as the assert just does ==, I have added a !== reference assert to ensure it really works, and disabled the test for now.
Contributor guide
Assessment
This issue has not been assessed yet.