cshannon commented on code in PR #3036:
URL: https://github.com/apache/accumulo/pull/3036#discussion_r1001817615
##########
test/src/main/java/org/apache/accumulo/test/conf/PropStoreConfigIT.java:
##########
@@ -46,23 +48,40 @@
import org.apache.accumulo.core.fate.zookeeper.ZooUtil;
import org.apache.accumulo.core.rpc.clients.ThriftClientTypes;
import org.apache.accumulo.core.trace.TraceUtil;
-import org.apache.accumulo.harness.AccumuloClusterHarness;
+import org.apache.accumulo.harness.SharedMiniClusterBase;
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.server.conf.store.NamespacePropKey;
import org.apache.accumulo.server.conf.store.SystemPropKey;
import org.apache.accumulo.server.conf.store.TablePropKey;
import org.apache.accumulo.test.util.Wait;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Tag(MINI_CLUSTER_ONLY)
@Tag(SUNNY_DAY)
-public class PropStoreConfigIT extends AccumuloClusterHarness {
+public class PropStoreConfigIT extends SharedMiniClusterBase {
private static final Logger log =
LoggerFactory.getLogger(PropStoreConfigIT.class);
+ @Override
+ protected Duration defaultTimeout() {
+ return Duration.ofMinutes(1);
+ }
+
+ @BeforeAll
+ public static void setup() throws Exception {
+ SharedMiniClusterBase.startMiniCluster();
+ }
+
+ @AfterAll
+ public static void teardown() {
+ SharedMiniClusterBase.stopMiniCluster();
+ }
+
Review Comment:
```suggestion
@BeforeEach
public void clear() throws Exception {
try (var client = Accumulo.newClient().from(getClientProps()).build()) {
client.instanceOperations().modifyProperties(Map::clear);
}
}
```
##########
test/src/main/java/org/apache/accumulo/test/conf/PropStoreConfigIT.java:
##########
@@ -46,23 +48,40 @@
import org.apache.accumulo.core.fate.zookeeper.ZooUtil;
import org.apache.accumulo.core.rpc.clients.ThriftClientTypes;
import org.apache.accumulo.core.trace.TraceUtil;
-import org.apache.accumulo.harness.AccumuloClusterHarness;
+import org.apache.accumulo.harness.SharedMiniClusterBase;
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.server.conf.store.NamespacePropKey;
import org.apache.accumulo.server.conf.store.SystemPropKey;
import org.apache.accumulo.server.conf.store.TablePropKey;
import org.apache.accumulo.test.util.Wait;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Tag(MINI_CLUSTER_ONLY)
@Tag(SUNNY_DAY)
-public class PropStoreConfigIT extends AccumuloClusterHarness {
+public class PropStoreConfigIT extends SharedMiniClusterBase {
private static final Logger log =
LoggerFactory.getLogger(PropStoreConfigIT.class);
+ @Override
+ protected Duration defaultTimeout() {
+ return Duration.ofMinutes(1);
+ }
+
+ @BeforeAll
+ public static void setup() throws Exception {
+ SharedMiniClusterBase.startMiniCluster();
+ }
+
+ @AfterAll
+ public static void teardown() {
+ SharedMiniClusterBase.stopMiniCluster();
+ }
+
Review Comment:
This is what I mean, I think this should be sufficient. Each test already
generally does this (clears out and tries to restore the previous state). The
issue is that if a test fails that may not execute or future tests may not do
that so I think it's best to add this just to make sure we are in a clean state
otherwise this looks good to me.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]