kevinrr888 commented on code in PR #4051:
URL: https://github.com/apache/accumulo/pull/4051#discussion_r1431597801
##########
test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java:
##########
@@ -80,11 +80,58 @@ public class ScanConsistencyIT extends
AccumuloClusterHarness {
private static final Logger log =
LoggerFactory.getLogger(ScanConsistencyIT.class);
- @SuppressFBWarnings(value = {"PREDICTABLE_RANDOM",
"DMI_RANDOM_USED_ONLY_ONCE"},
- justification = "predictable random is ok for testing")
+ 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/) into your accumulo
installation's
+ * lib directory*
+ * 3) Copy the JUnit dependencies into your accumulo installation's lib
directory:
+ * "mvn dependency:copy-dependencies -DincludeGroupIds="org.junit.jupiter"
+ * cp test/target/dependency/junit-jupiter-* $ACCUMULO_HOME/lib/"
+ *
+ * *Ensure the test jar is in lib before the tablet servers start. Restart
tablet
+ * servers if necessary.
+ *
+ * Now, this can be run with
+ * "accumulo org.apache.accumulo.test.ScanConsistencyIT <props-file>
<tmp-dir> <table> <sleep-time>"
+ * <props-file>: An accumulo client properties file
+ * <tmp-dir>: tmpDir field for the TestContext object
+ * <table>: The name of the table to be created
+ * <sleep-time>: The time to sleep (ms) after submitting the various
concurrent tasks
+ * @formatter:on
+ */
+ Preconditions.checkArgument(args.length == 4, "Invalid arguments. Use: "
+ + "accumulo org.apache.accumulo.test.ScanConsistencyIT <props-file>
<tmp-dir> <table> <sleep-time>");
+ final String propsFile = args[0];
+ final String tmpDir = args[1];
+ final String table = args[2];
+ final long sleepTime = Long.parseLong(args[3]);
+
+ try (AccumuloClient client = Accumulo.newClient().from(propsFile).build())
{
+ FileSystem fileSystem = FileSystem.get(new Configuration());
+ runTest(client, fileSystem, tmpDir, table, sleepTime);
+ } catch (Exception e) {
+ log.error(e.toString());
+ }
Review Comment:
Thanks, changed so main just throws an error now
##########
test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java:
##########
@@ -80,11 +80,58 @@ public class ScanConsistencyIT extends
AccumuloClusterHarness {
private static final Logger log =
LoggerFactory.getLogger(ScanConsistencyIT.class);
- @SuppressFBWarnings(value = {"PREDICTABLE_RANDOM",
"DMI_RANDOM_USED_ONLY_ONCE"},
- justification = "predictable random is ok for testing")
+ public static void main(String[] args) {
+ /**
+ * @formatter:off
Review Comment:
Thanks, I updated the comment
--
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]