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

Close ServerContext before Executor in AbstractNettyHttpServerTest #1101

Merged

Conversation

idelpivnitskiy
Copy link
Member

@idelpivnitskiy idelpivnitskiy commented Jul 23, 2020

Motivation:

Because the server's executor is closed before the server, all tests
from AbstractNettyHttpServerTest subclasses print
TaskBasedSignalOffloader - Failed to execute task on the executor
errors that pollute logs and make the build log unreadable.

Modifications:

  • Close ServerContext before Executor in AbstractNettyHttpServerTest;

Result:

No TaskBasedSignalOffloader errors in test logs.


Example of the polluted logs:

io.servicetalk.http.netty.NettyHttpServerConnectionAcceptorTest > testAcceptConnection[ssl=false client=IMMEDIATE server=CACHED DELAY_REJECT_ALL] STANDARD_OUT
    2020-07-22 17:50:53,190       client-io-executor-13-12 [ERROR] TaskBasedSignalOffloader       - Failed to execute task on the executor io.servicetalk.concurrent.api.ContextPreservingStExecutor@5a20367f. Invoking Subscriber (onError()) in the caller thread. Subscriber ContextPreservingCompletableSubscriberAndCancellable(ContextPreservingCompletableSubscriber(io.servicetalk.concurrent.api.ResumeCompletable$ResumeSubscriber@193d4b0c)).
    java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@1b1d3c44 rejected from java.util.concurrent.ThreadPoolExecutor@1f22abff[Shutting down, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 1]
        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063) ~[?:1.8.0_252]
        at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) ~[?:1.8.0_252]
        at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379) ~[?:1.8.0_252]
        at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) ~[?:1.8.0_252]
...

Motivation:

Because the server's executor is closed before the server, all tests
from `AbstractNettyHttpServerTest` subclasses print
`TaskBasedSignalOffloader - Failed to execute task on the executor`
errors that pollute logs and make the build log unreadable.

Modifications:

- Close `ServerContext` before `Executor` in `AbstractNettyHttpServerTest`;

Result:

No `TaskBasedSignalOffloader` errors in test logs.
@idelpivnitskiy
Copy link
Member Author

jdk8 build failed due to #1102

@servicetalk-bot test this please

@idelpivnitskiy idelpivnitskiy merged commit 1f44ea7 into apple:master Jul 23, 2020
@idelpivnitskiy idelpivnitskiy deleted the fix-AbstractNettyHttpServerTest branch July 23, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants