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

JUnit support - disable observers declared on mocked beans #11122

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Jul 31, 2020

@boring-cyborg boring-cyborg bot added area/arc Issue related to ARC (dependency injection) area/testing labels Jul 31, 2020
Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice!

@famod
Copy link
Member

famod commented Jul 31, 2020

Awesome! Will take me some time to review/test this, so don't wait for me in case the others approve before me.

/cc @mickroll in case you want to try this out: clone this branch & run mvn -Dquickly & use 999-SNAPSHOT in our project

@mkouba mkouba marked this pull request as ready for review August 3, 2020 08:09
- also rename MockableProxy to Mockable and remove it from the public API
- resolves quarkusio#11079
@mkouba
Copy link
Contributor Author

mkouba commented Aug 3, 2020

/cc @mickroll in case you want to try this out: clone this branch & run mvn -Dquickly & use 999-SNAPSHOT in our project

I'd recommend to build quarkus with mvn clean install -T 1C -DskipTests -DskipITs -Dquickly...

BTW there was a typo in the observer generator I've just fixed and force-pushed...

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Aug 3, 2020
@famod
Copy link
Member

famod commented Aug 3, 2020

I'd recommend to build quarkus with mvn clean install -T 1C -DskipTests -DskipITs -Dquickly...

Parallel build is flaky, especially for first time builds (see #10859) and quickly should also skip all tests, but yeah eveyone has his/her way. 😉

@mkouba
Copy link
Contributor Author

mkouba commented Aug 3, 2020

Yep, this time we don't want to run the tests but build the quarkus as quick as possible ;-).

@mkouba
Copy link
Contributor Author

mkouba commented Aug 3, 2020

The windows job got cancelled in 3h 1m 9s... Is it expected to take so long?

@geoand
Copy link
Contributor

geoand commented Aug 3, 2020

Nope, it should finish in 2 (or close to that)

@mkouba
Copy link
Contributor Author

mkouba commented Aug 4, 2020

Ok, so this time JDK Java 14 JVM Gradle Tests:

2020-08-03T15:11:24.3416664Z GrpcDevModeTest > main() FAILED
2020-08-03T15:11:24.3417128Z     org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
2020-08-03T15:11:24.3417586Z         at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
2020-08-03T15:11:24.3418042Z         at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
2020-08-03T15:11:24.3418422Z         at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
2020-08-03T15:11:24.3418817Z         at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
2020-08-03T15:11:24.3419195Z         at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:864)
2020-08-03T15:11:24.3419581Z         at io.quarkus.test.devmode.util.DevModeTestUtils.getHttpResponse(DevModeTestUtils.java:126)
2020-08-03T15:11:24.3419979Z         at io.quarkus.test.devmode.util.DevModeTestUtils.getHttpResponse(DevModeTestUtils.java:115)
2020-08-03T15:11:24.3420407Z         at io.quarkus.gradle.devmode.QuarkusDevGradleTestBase.getHttpResponse(QuarkusDevGradleTestBase.java:108)
2020-08-03T15:11:24.3421080Z         at io.quarkus.gradle.devmode.GrpcDevModeTest.testDevMode(GrpcDevModeTest.java:15)

I don't think it's related. Can anyone confirm my assumption?

@geoand
Copy link
Contributor

geoand commented Aug 4, 2020

Yes, that is totally unrelated.

@michalszynkiewicz seems like io.quarkus.gradle.devmode.GrpcDevModeTest is flaky.

@michalszynkiewicz
Copy link
Member

@geoand thanks for letting me know. The weird thing is that it failed before any modifications have been made...
Is it possible that gradle is not able to start dev mode in a minute?

@michalszynkiewicz
Copy link
Member

also, have you seen this failure on any other PR?

@geoand
Copy link
Contributor

geoand commented Aug 4, 2020

I have seen gradle failures from time to time, but TBH I don't remember which class was causing them

@gsmet
Copy link
Member

gsmet commented Aug 4, 2020

@michalszynkiewicz I confirm I have seen it in other pull requests.

@michalszynkiewicz
Copy link
Member

@gsmet always for grpc?

@michalszynkiewicz
Copy link
Member

@glefloch do you have some suspicions what may be the cause?

@mkouba
Copy link
Contributor Author

mkouba commented Aug 4, 2020

@gsmet Are we safe to merge this PR?

Pls move the gradle CI discussion to a separate issue.

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for late review (PTO).
PR looks good.

@gsmet
Copy link
Member

gsmet commented Aug 4, 2020

Yeah, failure looks unrelated.

Should this be backported to 1.7.0.Final or it's not worth it?

@glefloch
Copy link
Member

glefloch commented Aug 4, 2020

Gradle tests are slow but I don't think they are as slow as taking a minute to start the devmode. There used to be issues on windows with some locks inside Gradle cache but not on Unix.

@gsmet gsmet merged commit df445f9 into quarkusio:master Aug 4, 2020
@gsmet gsmet added this to the 1.7.0.CR2 milestone Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/testing triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InjectMock does not work on observer method
8 participants