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

Flaky test: HttpTransportObserverTest.serverFailsResponsePayloadBodyBeforeRead #1467

Closed
tkountis opened this issue Apr 1, 2021 · 3 comments
Labels
flaky tests Unit tests are flaky

Comments

@tkountis
Copy link
Contributor

tkountis commented Apr 1, 2021

Wanted but not invoked:
clientWriteObserver.writeComplete();
-> at io.servicetalk.http.netty.HttpTransportObserverTest.testServerFailsResponsePayloadBody(HttpTransportObserverTest.java:282)

However, there were exactly 8 interactions with this mock:
clientWriteObserver.requestedToWrite(64L);
-> at io.servicetalk.transport.api.CatchAllTransportObserver$CatchAllWriteObserver.lambda$requestedToWrite$0(CatchAllTransportObserver.java:237)

clientWriteObserver.itemReceived();
-> at io.servicetalk.transport.api.CatchAllTransportObserver.safeReport(CatchAllTransportObserver.java:283)

clientWriteObserver.onFlushRequest();
-> at io.servicetalk.transport.api.CatchAllTransportObserver.safeReport(CatchAllTransportObserver.java:283)

clientWriteObserver.itemReceived();
-> at io.servicetalk.transport.api.CatchAllTransportObserver.safeReport(CatchAllTransportObserver.java:283)

clientWriteObserver.itemWritten();
-> at io.servicetalk.transport.api.CatchAllTransportObserver.safeReport(CatchAllTransportObserver.java:283)

clientWriteObserver.writeFailed(
    io.servicetalk.transport.netty.internal.StacklessClosedChannelException
);
-> at io.servicetalk.transport.api.CatchAllTransportObserver$CatchAllWriteObserver.lambda$writeFailed$1(CatchAllTransportObserver.java:257)

clientWriteObserver.onFlushRequest();
-> at io.servicetalk.transport.api.CatchAllTransportObserver.safeReport(CatchAllTransportObserver.java:283)

clientWriteObserver.writeCancelled();
-> at io.servicetalk.transport.api.CatchAllTransportObserver.safeReport(CatchAllTransportObserver.java:283)


	at io.servicetalk.http.netty.HttpTransportObserverTest.testServerFailsResponsePayloadBody(HttpTransportObserverTest.java:282)
	at io.servicetalk.http.netty.HttpTransportObserverTest.serverFailsResponsePayloadBodyBeforeRead(HttpTransportObserverTest.java:250)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.mockito.internal.junit.JUnitRule$1.evaluateSafely(JUnitRule.java:57)
	at org.mockito.internal.junit.JUnitRule$1.evaluate(JUnitRule.java:48)
	at io.servicetalk.concurrent.internal.ServiceTalkTestTimeout$TimeoutStatement$CallableStatement.call(ServiceTalkTestTimeout.java:161)
	at io.servicetalk.concurrent.internal.ServiceTalkTestTimeout$TimeoutStatement$CallableStatement.call(ServiceTalkTestTimeout.java:153)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.lang.Thread.run(Thread.java:834)
@bondolo
Copy link
Contributor

bondolo commented Jul 4, 2021

https://github.com/apple/servicetalk/pull/1657/checks?check_run_id=2981632716

HttpTransportObserverTest > serverHandlerError(HttpProtocol) > io.servicetalk.http.netty.HttpTransportObserverTest.serverHandlerError(HttpProtocol)[2] FAILED
638
    java.util.concurrent.TimeoutException: serverHandlerError(io.servicetalk.http.netty.HttpProtocol) timed out after 30 seconds

@bondolo
Copy link
Contributor

bondolo commented Jul 8, 2021

https://github.com/apple/servicetalk/pull/1658/checks?check_run_id=3021176595

HttpTransportObserverTest > serverHandlerError(HttpProtocol) > io.servicetalk.http.netty.HttpTransportObserverTest.serverHandlerError(HttpProtocol)[2] FAILED
    java.util.concurrent.TimeoutException: serverHandlerError(io.servicetalk.http.netty.HttpProtocol) timed out after 30 seconds
        at org.junit.jupiter.engine.extension.TimeoutInvocation.createTimeoutException(TimeoutInvocation.java:70)

@idelpivnitskiy
Copy link
Member

The last two occurrences relate to #1663. The original one did not happen for a while. We made some changes in this area, so not sure if this issue is still valid. Let me close it and we can re-open if it happens again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky tests Unit tests are flaky
Projects
None yet
Development

No branches or pull requests

3 participants