Skip to content

Commit

Permalink
Update log level to ERROR for HelixZNodeSizeLimitTest (apache#9208)
Browse files Browse the repository at this point in the history
Co-authored-by: Jack Li(Analytics Engineering) <jlli@jlli-mn1.linkedin.biz>
  • Loading branch information
jackjlli and Jack Li(Analytics Engineering) authored Aug 13, 2022
1 parent 834909e commit 2f19683
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import org.apache.helix.zookeeper.constant.ZkSystemPropertyKeys;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.pinot.common.utils.helix.HelixHelper;
import org.apache.pinot.util.TestUtils;
import org.testng.Assert;
Expand All @@ -45,6 +47,13 @@ public void setUp()
// src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java#L105
// The below line gets executed before ZkClient.WRITE_SIZE_LIMIT is created
System.setProperty(ZkSystemPropertyKeys.JUTE_MAXBUFFER, "4000000");

// Set log level to ERROR, as there are too many warning messages printed if warn level is used like below:
// 20:07:11.616 WARN [TopStateHandoffReportStage] [HelixController-pipeline-default-HelixZNodeSizeLimitTest
// -(b90d2ed3_DEFAULT)] Event b90d2ed3_DEFAULT : Cannot confirm top state missing start time.
// Use the current system time as the start time.
Configurator.setAllLevels("", Level.ERROR);

TestUtils.ensureDirectoriesExistAndEmpty(_tempDir);

// Start Zookeeper
Expand All @@ -63,6 +72,9 @@ public void tearDown()
stopBroker();
stopController();
stopZk();

// Reset log level back to warn.
Configurator.setAllLevels("", Level.WARN);
}

@Test
Expand Down

0 comments on commit 2f19683

Please sign in to comment.