Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky
MultipartEncoderTckTest.required_spec101...
(#5136)
Motivation: `MultipartEncoderTckTest.required_spec101_XXX` fails quite often. https://ge.armeria.dev/scans/tests?search.timeZoneId=Asia/Seoul&tests.container=com.linecorp.armeria.common.multipart.MultipartEncoderTckTest&tests.test=required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements ```java java.lang.AssertionError: Publisher com.linecorp.armeria.common.multipart.MultipartEncoder@3eec8583 produced no element after first `request` within 200 ms at org.testng.Assert.fail(Assert.java:98) at org.reactivestreams.tck.TestEnvironment.flopAndFail(TestEnvironment.java:285) at org.reactivestreams.tck.TestEnvironment$Receptacle.next(TestEnvironment.java:1047) at org.reactivestreams.tck.TestEnvironment$ManualSubscriber.nextElement(TestEnvironment.java:514) at org.reactivestreams.tck.TestEnvironment$ManualSubscriber.nextElement(TestEnvironment.java:510) at org.reactivestreams.tck.PublisherVerification$3.run(PublisherVerification.java:212) at org.reactivestreams.tck.PublisherVerification.activePublisherTest(PublisherVerification.java:1135) at org.reactivestreams.tck.PublisherVerification.required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements(PublisherVerification.java:204) ``` The failure couldn't be reproduced locally. I checked the log on the Gradle scan and it shows that the classes are initialized when the test starts. I guess JVM lazy class initialization and the Netty worker group initialization could affect the failure. Modifications: - Early initialize Netty worker group before starting the tests - Increase timeout Result: - Closes #4554 --------- Co-authored-by: Trustin Lee <[email protected]>
- Loading branch information