kaisun2000 opened a new issue #1268:
URL: https://github.com/apache/helix/issues/1268


   Log:
   >2020-08-12T00:08:59.7823040Z [ERROR] 
testEnableCompressionResource(org.apache.helix.integration.TestEnableCompression)
  Time elapsed: 301.309 s  <<< FAILURE!
   2020-08-12T00:08:59.7832929Z 
org.testng.internal.thread.ThreadTimeoutException: Method 
org.testng.internal.TestNGMethod.testEnableCompressionResource() didn't finish 
within the time-out 300000
   2020-08-12T00:08:59.7840902Z         at 
org.apache.helix.integration.TestEnableCompression.testEnableCompressionResource(TestEnableCompression.java:116)
   2020-08-12T00:08:59.7841208Z 
   
   >2020-08-12T12:18:59.8288893Z ---------- Test Class TestPauseSignal thread 
leakage detected! ---------------
   2020-08-12T12:19:04.7889521Z START testEnableCompressionResource at Wed Aug 
12 12:19:04 UTC 2020
   2020-08-12T12:19:04.7896157Z START 
TestEnableCompression_testEnableCompressionResource at Wed Aug 12 12:19:04 UTC 
2020
   2020-08-12T12:24:05.2712624Z END testEnableCompressionResource at Wed Aug 12 
12:24:05 UTC 2020, took: 300482ms.
   2020-08-12T12:24:05.2713094Z AfterClass:TestEnableCompression afterclass of 
ZkTestBase called!
   2020-08-12T12:24:06.3960081Z TestEnableCompression has active threads cnt:838
   2020-08-12T12:24:06.4334615Z zookeeper server threads has 4 thread
   
   
   Test in intellij normally finished in 30 sec. 
   
   hangs `boolean result = verifier.verify(120000L);`      // ------> hanges 
here.
   
   ```
   public void testEnableCompressionResource() throws Exception {
       String className = TestHelper.getTestClassName();
       String methodName = TestHelper.getTestMethodName();
       String clusterName = className + "_" + methodName;
   
       System.out.println("START " + clusterName + " at " + new 
Date(System.currentTimeMillis()));
   
       MockParticipantManager[] participants = new MockParticipantManager[5];
       // ClusterSetup setupTool = new ClusterSetup(ZK_ADDR);
       int numNodes = 10;
       TestHelper.setupCluster(clusterName, ZK_ADDR, 12918, // participant port
           "localhost", // participant name prefix
           "TestDB", // resource name prefix
           0, // no resources, will be added later
           0, // partitions per resource
           numNodes, // number of nodes
           0, // replicas
           "OnlineOffline", false); // dont rebalance
       List<String> instancesInCluster =
           
_gSetupTool.getClusterManagementTool().getInstancesInCluster(clusterName);
       String resourceName = "TestResource";
       Set<String> expectedResources = new HashSet<>();
       expectedResources.add(resourceName);
       CustomModeISBuilder customModeISBuilder = new 
CustomModeISBuilder(resourceName);
   
       int numPartitions = 10000;
       int numReplica = 3;
       customModeISBuilder.setNumPartitions(numPartitions);
       customModeISBuilder.setNumReplica(numReplica);
       customModeISBuilder.setStateModel("OnlineOffline");
       for (int p = 0; p < numPartitions; p++) {
         String partitionName = resourceName + "_" + p;
         customModeISBuilder.add(partitionName);
         for (int r = 0; r < numReplica; r++) {
           String instanceName = instancesInCluster.get((p % numNodes + r) % 
numNodes);
           customModeISBuilder.assignInstanceAndState(partitionName, 
instanceName, "ONLINE");
         }
       }
   
       IdealState idealstate = customModeISBuilder.build();
       idealstate.getRecord().setBooleanField("enableCompression", true);
       _gSetupTool.getClusterManagementTool().addResource(clusterName, 
resourceName, idealstate);
   
       HelixZkClient.ZkClientConfig clientConfig = new 
HelixZkClient.ZkClientConfig();
       clientConfig.setZkSerializer(new BytesPushThroughSerializer())
           .setOperationRetryTimeout((long) (60 * 
1000)).setConnectInitTimeout(60 * 1000);
       HelixZkClient zkClient = SharedZkClientFactory.getInstance()
           .buildZkClient(new HelixZkClient.ZkConnectionConfig(ZK_ADDR), 
clientConfig);
   
       ClusterControllerManager controller =
           new ClusterControllerManager(ZK_ADDR, clusterName, "controller_0");
       controller.syncStart();
   
       Set<String> expectedLiveInstances = new HashSet<>();
       // start participants
       for (int i = 0; i < 5; i++) {
         String instanceName = "localhost_" + (12918 + i);
         participants[i] = new MockParticipantManager(ZK_ADDR, clusterName, 
instanceName);
         participants[i].syncStart();
         expectedLiveInstances.add(instanceName);
       }
   
       BestPossibleExternalViewVerifier verifier =
           new 
BestPossibleExternalViewVerifier.Builder(clusterName).setZkAddr(ZK_ADDR)
               
.setExpectLiveInstances(expectedLiveInstances).setResources(expectedResources).build();
       boolean result = verifier.verify(120000L);      // ------> hanges here.
       Assert.assertTrue(result);
   
       List<String> compressedPaths = new ArrayList<>();
       findCompressedZNodes(zkClient, "/" + clusterName, compressedPaths);
   
       System.out.println("compressed paths:" + compressedPaths);
       // ONLY IDEALSTATE and EXTERNAL VIEW must be compressed
       Assert.assertEquals(compressedPaths.size(), 2);
       String idealstatePath = PropertyPathBuilder.idealState(clusterName, 
resourceName);
       String externalViewPath = PropertyPathBuilder.externalView(clusterName, 
resourceName);
       Assert.assertTrue(compressedPaths.contains(idealstatePath));
       Assert.assertTrue(compressedPaths.contains(externalViewPath));
   
       // clean up
       controller.syncStop();
       for (int i = 0; i < 5; i++) {
         participants[i].syncStop();
       }
   
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to