QuarkusIntegrationTest : replacing 'Clock' bean with a fixed clock for tests #39723
Unanswered
kirankolli-addepar
asked this question in
Q&A
Replies: 2 comments 8 replies
-
/cc @geoand (testing) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is a fairly common scenario - Applications use
clock
which is then referred to derive the current time. In case ofIntegration Tests
we would like to replace this with aClock.fixed()
that points to a specific point in time instead of the regular clock that the application uses in dev or prod. How can we achieve this with Quarkus ?I have tried :
Adding a bean with
IfBuildProfile
andPriority(Integer.MAX_VALUE)
in theQuarkusTestProfile
hoping that this bean would somehow replace the regular bean getting injected but that did not work.Is the only way to override this is changing from
QuarkusIntegrationTest
toQuarkusTest
?Beta Was this translation helpful? Give feedback.
All reactions