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

Report j.l.Error instances from ConcurrentTestWorker #53

Merged
merged 2 commits into from
Oct 25, 2016

Conversation

bentmann
Copy link
Contributor

@bentmann bentmann commented Oct 25, 2016

http://bamboo.s/browse/OSS-GOODIESF18-1

--- failed task run whose cause isn't reported
2016-10-22 20:04:15,298-0400 INFO  [pool-41-thread-7] *SYSTEM com.sonatype.nexus.repository.testsupport.pypi.PyPiClient - Requesting GET http://localhost:34778/repository/concurrentProxyTest/simple/bpackage/ HTTP/1.1
2016-10-22 20:04:15,894-0400 INFO  [pool-41-thread-7] *SYSTEM com.sonatype.nexus.repository.testsupport.pypi.PyPiClient - Received HttpResponseProxy{HTTP/1.1 200 OK [Date: Sun, 23 Oct 2016 00:04:15 GMT, Server: Nexus/3.1.0-SNAPSHOT (OSS), X-Frame-Options: SAMEORIGIN, X-Content-Type-Options: nosniff, Last-Modified: Sun, 23 Oct 2016 00:04:15 GMT, Content-Type: text/html, Content-Length: 488] ResponseEntityProxy{[Content-Type: text/html,Content-Length: 488,Chunked: false]}}
--- the absence of further logs from this thread suggests ConcurrentTask.run() threw an exception the test worker didn't catch
2016-10-22 20:04:16,009-0400 INFO  [pool-41-thread-7] *SYSTEM org.sonatype.goodies.testsupport.concurrent.ConcurrentTestWorker - Test worker 6 done

--- this is a healthy task run for comparison
2016-10-22 20:04:15,297-0400 INFO  [pool-41-thread-6] *SYSTEM com.sonatype.nexus.repository.testsupport.pypi.PyPiClient - Requesting GET http://localhost:34778/repository/concurrentProxyTest/simple/bpackage/ HTTP/1.1
2016-10-22 20:04:15,985-0400 INFO  [pool-41-thread-6] *SYSTEM com.sonatype.nexus.repository.testsupport.pypi.PyPiClient - Received HttpResponseProxy{HTTP/1.1 200 OK [Date: Sun, 23 Oct 2016 00:04:15 GMT, Server: Nexus/3.1.0-SNAPSHOT (OSS), X-Frame-Options: SAMEORIGIN, X-Content-Type-Options: nosniff, Last-Modified: Sun, 23 Oct 2016 00:04:15 GMT, Content-Type: text/html, Content-Length: 488] ResponseEntityProxy{[Content-Type: text/html,Content-Length: 488,Chunked: false]}}
2016-10-22 20:04:16,044-0400 INFO  [pool-41-thread-6] *SYSTEM com.sonatype.nexus.repository.testsupport.pypi.PyPiClient - Requesting GET http://localhost:34778/repository/concurrentProxyTest/packages/00/01/02/bpackage-2.1.0-py2.py3-none-any.whl HTTP/1.1
2016-10-22 20:04:16,156-0400 INFO  [pool-41-thread-6] *SYSTEM com.sonatype.nexus.repository.testsupport.pypi.PyPiClient - Received HttpResponseProxy{HTTP/1.1 200 OK [Date: Sun, 23 Oct 2016 00:04:16 GMT, Server: Nexus/3.1.0-SNAPSHOT (OSS), X-Frame-Options: SAMEORIGIN, X-Content-Type-Options: nosniff, Last-Modified: Sun, 23 Oct 2016 00:04:16 GMT, Content-Type: application/zip, Content-Length: 22] ResponseEntityProxy{[Content-Type: application/zip,Content-Length: 22,Chunked: false]}}
2016-10-22 20:04:16,163-0400 INFO  [pool-41-thread-6] *SYSTEM org.sonatype.goodies.testsupport.concurrent.ConcurrentTestWorker - Test worker 5 completing iteration 0

--- because one task runner (test worker 6) quit before it completed all iterations, the others now time out waiting for it to join the cyclic barrier
2016-10-22 20:05:56,170-0400 INFO  [pool-41-thread-6] *SYSTEM org.sonatype.goodies.testsupport.concurrent.ConcurrentTestWorker - Test worker 5's task threw exception
java.util.concurrent.TimeoutException: null
    at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:257) [na:1.8.0_45]
    at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:435) [na:1.8.0_45]
    at org.sonatype.goodies.testsupport.concurrent.ConcurrentTestContext.awaitIterationStart(ConcurrentTestContext.java:82)

The end result is still a test failure but as is, the cause is unknown and in particular cannot be fixed.

@sonatype-zion
Copy link
Contributor

SonarQube analysis reported 1 issue

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MAJOR ConcurrentTestWorker.java#L57: Extract this nested try block into a separate method. rule

Copy link
Member

@dbradicich dbradicich left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

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

+1

@bentmann
Copy link
Contributor Author

Thanks for the quick reviews!

@bentmann bentmann merged commit 5c3560a into master Oct 25, 2016
@bentmann bentmann deleted the handle-any-throwable branch October 25, 2016 15:36
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.

4 participants