[ 
https://issues.apache.org/jira/browse/HADOOP-19979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jose Luis López updated HADOOP-19979:
-------------------------------------
    Description: 
Four tests assert on, or tear down around, work owned by another thread without
waiting for it or stopping it. All four fail intermittently, and none of the
failures say anything about the code under test.
 * {{TestSSLHttpServerMTLS.testUntrustedClientIsRejected}} (common) expects an
SSLHandshakeException, but the server's close races the client's last handshake
flight; when the close wins the client gets a SocketException instead. 7 of 25
runs fail. Assert that the request is refused rather than which exception
carries it.

 * {{TestLogAggregationService.testLocalFileDeletionAfterUpload}} (nodemanager)
waits for each log file to go, then asserts on the parent directory with no
wait; DeletionService removes files before the directories holding them. Hit 4
of the 60 most recent PRs, including unrelated ones. Wait for the directory too.

 * {{TestStandbyCheckpoints.testLastCheckpointTime}} (hdfs) waits for the active
to hold the new image, then reads a standby's checkpoint time, which that wait
does not cover: any standby may be the uploader, and it stamps
lastCheckpointTime only after doCheckpoint() returns, so the interval can read 0
against an expected 3000. Wait for that value to move.

 * {{TestTimelineReaderHBaseDown}} (timelineservice-hbase-tests) starts a
TimelineReaderServer in all five tests and never stops one, leaking the
TimelineStorageMonitor it schedules: non-daemon threads polling a minicluster
the test has torn down. The module builds with forkCount 0, so these accumulate
across its eleven test classes. Stop the server in a finally, as every other
test in the module already does.

Test-only change. 

  was:
Two tests assert on work that finishes on another thread, without
waiting for it. Both fail intermittently.

TestSSLHttpServerMTLS.testUntrustedClientIsRejected expects an
SSLHandshakeException. The server drops the connection as soon as it
rejects the client certificate, racing the client's last handshake
flight; when the close wins, the client fails writing it and gets a
SocketException instead. 7 of 25 runs fail. The server guarantees the
request is refused, not which exception the client sees, so assert
that.

TestLogAggregationService.testLocalFileDeletionAfterUpload waits for
each log file to disappear, then asserts on the enclosing directory
with no wait. DeletionService removes files before the directories
holding them, so the assertion can run in between. Hit 4 of the 60 most
recent PRs, including unrelated ones. Wait for the directory too.

       Priority: Critical  (was: Minor)
        Summary: Fix four tests that assert on work owned by another thread  
(was: Fix flaky TestLogAggregationService and TestSSLHttpServerMTLS)

> Fix four tests that assert on work owned by another thread
> ----------------------------------------------------------
>
>                 Key: HADOOP-19979
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19979
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: common, test
>            Reporter: Jose Luis López
>            Priority: Critical
>              Labels: pull-request-available
>
> Four tests assert on, or tear down around, work owned by another thread 
> without
> waiting for it or stopping it. All four fail intermittently, and none of the
> failures say anything about the code under test.
>  * {{TestSSLHttpServerMTLS.testUntrustedClientIsRejected}} (common) expects an
> SSLHandshakeException, but the server's close races the client's last 
> handshake
> flight; when the close wins the client gets a SocketException instead. 7 of 25
> runs fail. Assert that the request is refused rather than which exception
> carries it.
>  * {{TestLogAggregationService.testLocalFileDeletionAfterUpload}} 
> (nodemanager)
> waits for each log file to go, then asserts on the parent directory with no
> wait; DeletionService removes files before the directories holding them. Hit 4
> of the 60 most recent PRs, including unrelated ones. Wait for the directory 
> too.
>  * {{TestStandbyCheckpoints.testLastCheckpointTime}} (hdfs) waits for the 
> active
> to hold the new image, then reads a standby's checkpoint time, which that wait
> does not cover: any standby may be the uploader, and it stamps
> lastCheckpointTime only after doCheckpoint() returns, so the interval can 
> read 0
> against an expected 3000. Wait for that value to move.
>  * {{TestTimelineReaderHBaseDown}} (timelineservice-hbase-tests) starts a
> TimelineReaderServer in all five tests and never stops one, leaking the
> TimelineStorageMonitor it schedules: non-daemon threads polling a minicluster
> the test has torn down. The module builds with forkCount 0, so these 
> accumulate
> across its eleven test classes. Stop the server in a finally, as every other
> test in the module already does.
> Test-only change. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to