DomGarguilo commented on code in PR #4051:
URL: https://github.com/apache/accumulo/pull/4051#discussion_r1422887816
##########
test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java:
##########
@@ -79,12 +79,58 @@
public class ScanConsistencyIT extends AccumuloClusterHarness {
private static final Logger log =
LoggerFactory.getLogger(ScanConsistencyIT.class);
+ private static boolean inTestingContext;
+
+ public static void main(String[] args) {
+ /**
+ * @formatter:off
+ * Note: In order to run main,
+ * 1) Build the project
+ * 2) Copy the accumulo test jar (in /test/target/) to your accumulo
installation's
+ * lib directory*
+ * Now, this can be run with
+ * "accumulo org.apache.accumulo.test.ScanConsistencyIT <props-file>
<tmp-dir> <table>"
+ * <props-file>: An accumulo client properties file
+ * <tmp-dir>: tmpDir field for the TestContext object
+ * <table>: The name of the table to be created
+ * *Ensure the test jar is in lib before the tablet servers start. Restart
tablet
+ * servers if necessary.
+ * @formatter:on
+ */
+ if (args.length == 3) {
+ inTestingContext = false;
+ final String propsFile = args[0];
+ final String tmpDir = args[1];
+ final String table = args[2];
+
+ try {
+ AccumuloClient client = Accumulo.newClient().from(propsFile).build();
Review Comment:
```suggestion
try (AccumuloClient client =
Accumulo.newClient().from(propsFile).build()) {
```
Can move `client` into the try-with-resources block so it is closed
automatically.
--
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]