Skip to content

RATIS-1491. TestNettyDataStreamChainTopologyWithGrpcCluster timed out after 100 seconds#583

Merged
szetszwo merged 3 commits intoapache:masterfrom
adoroszlai:RATIS-1491
Jan 18, 2022
Merged

RATIS-1491. TestNettyDataStreamChainTopologyWithGrpcCluster timed out after 100 seconds#583
szetszwo merged 3 commits intoapache:masterfrom
adoroszlai:RATIS-1491

Conversation

@adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Jan 18, 2022

What changes were proposed in this pull request?

Fix timeout in DataStreamAsyncClusterTests.

testMultipleStreamsMultipleServersStepDownLeader has 300 seconds timeout, but is frequently stopped after 100 seconds:

Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 205.692 s <<< FAILURE! - in org.apache.ratis.datastream.TestNettyDataStreamChainTopologyWithGrpcCluster
testMultipleStreamsMultipleServersStepDownLeader(org.apache.ratis.datastream.TestNettyDataStreamChainTopologyWithGrpcCluster)  Time elapsed: 100.021 s  <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 100 seconds

Timeout specified in @Test(timeout = ...) is limited by the BaseTest#globalTimeout rule, which defaults to 100 seconds. We need to override getGlobalTimeout() to increase the rule's timeout.

Remove ineffective timeout from OutputStreamBaseTest.

OutputStreamBaseTest also has a test case which intends to increase timeout to 300 seconds. But this test case normally runs in less than 30 seconds:

Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 23.712 s - in org.apache.ratis.grpc.TestRaftOutputStreamWithGrpc
Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 23.956 s - in org.apache.ratis.grpc.TestGrpcOutputStream

and intermittently times out even with 300 seconds (after applying the fix described above for OutputStreamBaseTests):

Tests run: 4, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 302.175 s <<< FAILURE! - in org.apache.ratis.grpc.TestGrpcOutputStream

So I think we should apply the default 100 seconds timeout to save time in the failure case, and fix the test instead (filed RATIS-1493 for this).

https://issues.apache.org/jira/browse/RATIS-1491

How was this patch tested?

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 147.409 s - in org.apache.ratis.datastream.TestNettyDataStreamStarTopologyWithGrpcCluster
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 154.069 s - in org.apache.ratis.datastream.TestNettyDataStreamChainTopologyWithGrpcCluster

https://github.com/adoroszlai/incubator-ratis/runs/4849875094

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 136.271 s - in org.apache.ratis.datastream.TestNettyDataStreamStarTopologyWithGrpcCluster
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 138.918 s - in org.apache.ratis.datastream.TestNettyDataStreamChainTopologyWithGrpcCluster

https://github.com/adoroszlai/incubator-ratis/runs/4854999261

@adoroszlai adoroszlai self-assigned this Jan 18, 2022
@adoroszlai adoroszlai requested a review from szetszwo January 18, 2022 15:47
Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

+1 the change looks good.

@szetszwo szetszwo merged commit e296b56 into apache:master Jan 18, 2022
@adoroszlai adoroszlai deleted the RATIS-1491 branch January 18, 2022 16:46
@adoroszlai
Copy link
Contributor Author

Thanks @szetszwo for reviewing and committing it.

symious pushed a commit to symious/ratis that referenced this pull request Feb 28, 2024
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