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


   LOG:
   >2020-08-14T23:50:43.0367342Z [ERROR]   
TestClusterInMaintenanceModeWhenReachingMaxPartition.testDisableCluster:119 
expected:<true> but was:<false>
   
   >2020-08-14T23:50:42.7833847Z [ERROR] 
testDisableCluster(org.apache.helix.integration.rebalancer.TestClusterInMaintenanceModeWhenReachingMaxPartition)
  Time elapsed: 5.459 s  <<< FAILURE!
   2020-08-14T23:50:42.7833998Z java.lang.AssertionError: expected:<true> but 
was:<false>
   2020-08-14T23:50:42.7834145Z         at 
org.apache.helix.integration.rebalancer.TestClusterInMaintenanceModeWhenReachingMaxPartition.testDisableCluster(TestClusterInMaintenanceModeWhenReachingMaxPartition.java:119)
   2020-08-14T23:50:42.7834251Z 
   
   
   Pure waiting, bad test? How to enhance?
   
   ```
     @Test
     public void testDisableCluster() throws Exception {
       ConfigAccessor configAccessor = new ConfigAccessor(_gZkClient);
       ClusterConfig clusterConfig = 
configAccessor.getClusterConfig(CLUSTER_NAME);
       clusterConfig.setMaxPartitionsPerInstance(10);
       configAccessor.setClusterConfig(CLUSTER_NAME, clusterConfig);
   
       int i = 0;
       for (String stateModel : TestStateModels) {
         String db = "Test-DB-" + i++;
         int replica = 3;
         createResourceWithDelayedRebalance(CLUSTER_NAME, db, stateModel, 
_PARTITIONS, replica,
             replica, -1);
         _testDBs.add(db);
       }
       Thread.sleep(100L);
       Assert.assertTrue(_clusterVerifier.verifyByPolling());
   
       MaintenanceSignal maintenanceSignal =
           _dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance());
       Assert.assertNull(maintenanceSignal);
   
       for (i = 2; i < NUM_NODE; i++) {
         _participants.get(i).syncStop();
       }
   
       Thread.sleep(1000L);
       maintenanceSignal = 
_dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance());
       Assert.assertNotNull(maintenanceSignal);
       Assert.assertNotNull(maintenanceSignal.getReason());
     }
   
   
   ```


----------------------------------------------------------------
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