Skip to content

Commit

Permalink
add a new test regarding the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
teamconfx committed Sep 14, 2023
1 parent f2376b8 commit bf6c31f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,22 @@ protected Configuration getSecretConf(String connectString) {
@SuppressWarnings("unchecked")
@Test
public void testMultiNodeOperations() throws Exception {
testMultiNodeOperationsImpl(false);
}

@Test
public void testMultiNodeOperationsWithZeroRetry() throws Exception {
testMultiNodeOperationsImpl(true);
}

public void testMultiNodeOperationsImpl(boolean setZeroRetry) throws Exception {
for (int i = 0; i < TEST_RETRIES; i++) {
DelegationTokenManager tm1, tm2 = null;
String connectString = zkServer.getConnectString();
Configuration conf = getSecretConf(connectString);
if (setZeroRetry) {
conf.setInt(ZKDelegationTokenSecretManager.ZK_DTSM_ZK_NUM_RETRIES, 0);
}
tm1 = new DelegationTokenManager(conf, new Text("bla"));
tm1.init();
tm2 = new DelegationTokenManager(conf, new Text("bla"));
Expand Down

0 comments on commit bf6c31f

Please sign in to comment.