tigerquoll commented on a change in pull request #1383: METRON-1788 Batch 
profiler pull profile information from zookeeper
URL: https://github.com/apache/metron/pull/1383#discussion_r280201152
 
 

 ##########
 File path: 
metron-platform/metron-common/src/test/java/org/apache/metron/common/configuration/ConfigurationsUtilsTest.java
 ##########
 @@ -18,74 +18,71 @@
 
 package org.apache.metron.common.configuration;
 
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Optional;
 import org.adrianwalker.multilinestring.Multiline;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.test.TestingServer;
 import org.apache.metron.TestConstants;
 import org.apache.metron.common.utils.JSONUtils;
-import org.junit.After;
-
+import org.apache.metron.integration.TestZKServer;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
 
 public class ConfigurationsUtilsTest {
 
 Review comment:
   Good point.  I had originally refactored ConfigurationUtilsTest to break out 
some zookeeper profile configuration loading / reading code I needed for my own 
tests.   Subsequently I found an existing API that had the functionality I 
needed, and modified my code to use that API.  There is no real need for this 
changes to this module to be in this PR so I have reverted them.
   
   Incidentally - adhoc manual profiling in using Intellij indicates that 
setting up and tearing down zookeeper for each tests adds about 0.5 - 1 second 
to the run time for ConfigurationUtilsTest.  Breaking up the large test into 4 
smaller tests adds just under 4 seconds to the run time.  Together these two 
changes pushed run time from around 6 seconds to around 10 seconds.

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


With regards,
Apache Git Services

Reply via email to