-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-28417 TestBlockingIPC.testBadPreambleHeader sometimes fails with… #5740
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…h broken pipe instead of bad auth Also change the IPC related tests to test different combinations of rpc server&client, for example, NettyRpcClient and SimpleRpcServer
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can improve the test further by getting rid of shared state in the base class. But more/better coverage looks good. Do the additional permutations result in a longer test time? Does the MediumTest annotation need tweaked as well?
@@ -114,14 +118,12 @@ public abstract class AbstractTestIPC { | |||
private static final KeyValue CELL = new KeyValue(CELL_BYTES, CELL_BYTES, CELL_BYTES, CELL_BYTES); | |||
|
|||
protected static final Configuration CONF = HBaseConfiguration.create(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you get rid of this static CONF instance entirely. All of its accesses in this class are using it with a copy constructor, but TestNettyTlsIPC is using/modifying it directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can not get rid of it, we need to change some configurations in setUp and tearDown. And in TestNettyTlsIPC, we need to change the configurations in setUpBeforeClass, so it has to be static...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copying in the tests method is because we need to customize some client configurations, so we want to affect other test methods.
BadAuthException error = null; | ||
// for SimpleRpcServer, it is possible that we get a broken pipe before getting the | ||
// BadAuthException, so we add some retries here, see HBASE-28417 | ||
for (int i = 0; i < 10; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, same request as I received from @NihalJain -- can this use Waiter instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the things are a bit different. It is not something that after some time, things will go right. We just need to try several times, and we should get at least one time, things go as expected...
The tests runs pretty fast, as it does not need to setup a mini cluster, just start some socket servers. On my local machine, the TestNettyIPC can be finished within 15 seconds. |
…h broken pipe instead of bad auth (#5740) Also change the IPC related tests to test different combinations of rpc server&client, for example, NettyRpcClient and SimpleRpcServer Signed-off-by: Nick Dimiduk <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]> (cherry picked from commit 2306820)
…h broken pipe instead of bad auth (#5740) Also change the IPC related tests to test different combinations of rpc server&client, for example, NettyRpcClient and SimpleRpcServer Signed-off-by: Nick Dimiduk <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]> (cherry picked from commit 2306820)
…h broken pipe instead of bad auth (#5740) Also change the IPC related tests to test different combinations of rpc server&client, for example, NettyRpcClient and SimpleRpcServer Signed-off-by: Nick Dimiduk <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]> (cherry picked from commit 2306820)
…h broken pipe instead of bad auth (#5740) Also change the IPC related tests to test different combinations of rpc server&client, for example, NettyRpcClient and SimpleRpcServer Signed-off-by: Nick Dimiduk <[email protected]> Signed-off-by: Bryan Beaudreault <[email protected]> (cherry picked from commit 2306820)
… broken pipe instead of bad auth
Also change the IPC related tests to test different combinations of rpc server&client, for example, NettyRpcClient and SimpleRpcServer