[01/10] accumulo git commit: ACCUMULO-4394 Fix up ShellServerIT#addauths

2016-08-01 Thread elserj
Repository: accumulo
Updated Branches:
  refs/heads/1.6 dcc5dffc8 -> d79776d78
  refs/heads/1.7 5b80b2a4d -> 268922b21
  refs/heads/1.8 74507ae3a -> 36f8fcc7f
  refs/heads/master ecd345d54 -> 240002e63


ACCUMULO-4394 Fix up ShellServerIT#addauths

The first loop did not set success=true upon success and would
always iterate 9 times. We don't have to limit the number of attempts,
instead rely on the junit timeout rule and run for as long as allowed.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d79776d7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d79776d7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d79776d7

Branch: refs/heads/1.6
Commit: d79776d78d47570915a6195e1734807160ae566d
Parents: dcc5dff
Author: Josh Elser 
Authored: Mon Aug 1 16:20:16 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:20:16 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 26 ++--
 1 file changed, 8 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d79776d7/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java 
b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index 77496ce..95066a5 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -598,7 +598,8 @@ public class ShellServerIT extends SharedMiniClusterIT {
 // addauths
 ts.exec("createtable " + table + " -evc");
 boolean success = false;
-for (int i = 0; i < 9 && !success; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!success) {
   try {
 ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
   @Override
@@ -611,34 +612,23 @@ public class ShellServerIT extends SharedMiniClusterIT {
 }
   }
 });
+success = true;
   } catch (AssertionError e) {
-Thread.sleep(200);
+Thread.sleep(500);
   }
 }
-if (!success) {
-  ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
-@Override
-public String getErrorMessage() {
-  try {
-Connector c = getConnector();
-return "Current auths for root are: " + 
c.securityOperations().getUserAuthorizations("root").toString();
-  } catch (Exception e) {
-return "Could not check authorizations";
-  }
-}
-  });
-}
 ts.exec("addauths -s foo,bar", true);
 boolean passed = false;
-for (int i = 0; i < 50 && !passed; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!passed) {
   try {
 ts.exec("getauths", true, "foo", true);
 ts.exec("getauths", true, "bar", true);
 passed = true;
   } catch (Exception e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   } catch (AssertionError e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   }
 }
 assertTrue("Could not successfully see updated authoriations", passed);



[07/10] accumulo git commit: Merge branch '1.6' into 1.7

2016-08-01 Thread elserj
Merge branch '1.6' into 1.7


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/268922b2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/268922b2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/268922b2

Branch: refs/heads/master
Commit: 268922b21cb08e05f4d3268c4cbafeeefe75fee7
Parents: 5b80b2a d79776d
Author: Josh Elser 
Authored: Mon Aug 1 16:43:35 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:43:35 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 24 ++--
 1 file changed, 7 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/268922b2/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --cc test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index ced4a6a,95066a5..b7bf85b
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@@ -717,8 -625,10 +707,8 @@@ public class ShellServerIT extends Shar
  ts.exec("getauths", true, "foo", true);
  ts.exec("getauths", true, "bar", true);
  passed = true;
 -  } catch (Exception e) {
 -UtilWaitThread.sleep(500);
 -  } catch (AssertionError e) {
 +  } catch (AssertionError | Exception e) {
- UtilWaitThread.sleep(300);
+ UtilWaitThread.sleep(500);
}
  }
  assertTrue("Could not successfully see updated authoriations", passed);



[10/10] accumulo git commit: Merge branch '1.8'

2016-08-01 Thread elserj
Merge branch '1.8'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/240002e6
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/240002e6
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/240002e6

Branch: refs/heads/master
Commit: 240002e6366e3e69eb792ec39ac6a847f3ec4330
Parents: ecd345d 36f8fcc
Author: Josh Elser 
Authored: Mon Aug 1 16:55:39 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:55:39 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 24 ++--
 1 file changed, 7 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/240002e6/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
--



[02/10] accumulo git commit: ACCUMULO-4394 Fix up ShellServerIT#addauths

2016-08-01 Thread elserj
ACCUMULO-4394 Fix up ShellServerIT#addauths

The first loop did not set success=true upon success and would
always iterate 9 times. We don't have to limit the number of attempts,
instead rely on the junit timeout rule and run for as long as allowed.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d79776d7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d79776d7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d79776d7

Branch: refs/heads/1.7
Commit: d79776d78d47570915a6195e1734807160ae566d
Parents: dcc5dff
Author: Josh Elser 
Authored: Mon Aug 1 16:20:16 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:20:16 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 26 ++--
 1 file changed, 8 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d79776d7/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java 
b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index 77496ce..95066a5 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -598,7 +598,8 @@ public class ShellServerIT extends SharedMiniClusterIT {
 // addauths
 ts.exec("createtable " + table + " -evc");
 boolean success = false;
-for (int i = 0; i < 9 && !success; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!success) {
   try {
 ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
   @Override
@@ -611,34 +612,23 @@ public class ShellServerIT extends SharedMiniClusterIT {
 }
   }
 });
+success = true;
   } catch (AssertionError e) {
-Thread.sleep(200);
+Thread.sleep(500);
   }
 }
-if (!success) {
-  ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
-@Override
-public String getErrorMessage() {
-  try {
-Connector c = getConnector();
-return "Current auths for root are: " + 
c.securityOperations().getUserAuthorizations("root").toString();
-  } catch (Exception e) {
-return "Could not check authorizations";
-  }
-}
-  });
-}
 ts.exec("addauths -s foo,bar", true);
 boolean passed = false;
-for (int i = 0; i < 50 && !passed; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!passed) {
   try {
 ts.exec("getauths", true, "foo", true);
 ts.exec("getauths", true, "bar", true);
 passed = true;
   } catch (Exception e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   } catch (AssertionError e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   }
 }
 assertTrue("Could not successfully see updated authoriations", passed);



[05/10] accumulo git commit: Merge branch '1.6' into 1.7

2016-08-01 Thread elserj
Merge branch '1.6' into 1.7


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/268922b2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/268922b2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/268922b2

Branch: refs/heads/1.8
Commit: 268922b21cb08e05f4d3268c4cbafeeefe75fee7
Parents: 5b80b2a d79776d
Author: Josh Elser 
Authored: Mon Aug 1 16:43:35 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:43:35 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 24 ++--
 1 file changed, 7 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/268922b2/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --cc test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index ced4a6a,95066a5..b7bf85b
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@@ -717,8 -625,10 +707,8 @@@ public class ShellServerIT extends Shar
  ts.exec("getauths", true, "foo", true);
  ts.exec("getauths", true, "bar", true);
  passed = true;
 -  } catch (Exception e) {
 -UtilWaitThread.sleep(500);
 -  } catch (AssertionError e) {
 +  } catch (AssertionError | Exception e) {
- UtilWaitThread.sleep(300);
+ UtilWaitThread.sleep(500);
}
  }
  assertTrue("Could not successfully see updated authoriations", passed);



[09/10] accumulo git commit: Merge branch '1.7' into 1.8

2016-08-01 Thread elserj
Merge branch '1.7' into 1.8


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/36f8fcc7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/36f8fcc7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/36f8fcc7

Branch: refs/heads/master
Commit: 36f8fcc7f578044b01d0f445b2fab6dc65bb610b
Parents: 74507ae 268922b
Author: Josh Elser 
Authored: Mon Aug 1 16:55:25 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:55:25 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 24 ++--
 1 file changed, 7 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/36f8fcc7/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --cc test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index 61d3d4a,000..8db0185
mode 100644,00..100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@@ -1,1894 -1,0 +1,1884 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.test;
 +
 +import static 
com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 +import static org.junit.Assert.assertEquals;
 +import static org.junit.Assert.assertFalse;
 +import static org.junit.Assert.assertNotNull;
 +import static org.junit.Assert.assertTrue;
 +import static org.junit.Assert.fail;
 +
 +import java.io.BufferedReader;
 +import java.io.File;
 +import java.io.FileReader;
 +import java.io.IOException;
 +import java.io.InputStream;
 +import java.io.OutputStream;
 +import java.io.PrintWriter;
 +import java.lang.reflect.Constructor;
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.Collections;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Map.Entry;
 +import java.util.Random;
 +import java.util.concurrent.TimeUnit;
 +
 +import org.apache.accumulo.core.Constants;
 +import org.apache.accumulo.core.client.ClientConfiguration;
 +import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.IteratorSetting;
 +import org.apache.accumulo.core.client.Scanner;
 +import org.apache.accumulo.core.client.TableNotFoundException;
 +import org.apache.accumulo.core.client.admin.TableOperations;
 +import org.apache.accumulo.core.client.impl.Namespaces;
 +import org.apache.accumulo.core.client.sample.RowSampler;
 +import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 +import org.apache.accumulo.core.client.security.tokens.KerberosToken;
 +import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 +import org.apache.accumulo.core.conf.AccumuloConfiguration;
 +import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.core.data.Key;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.file.FileOperations;
 +import org.apache.accumulo.core.file.FileSKVWriter;
 +import org.apache.accumulo.core.metadata.MetadataTable;
 +import org.apache.accumulo.core.security.Authorizations;
 +import org.apache.accumulo.core.util.format.Formatter;
 +import org.apache.accumulo.core.util.format.FormatterConfig;
 +import org.apache.accumulo.harness.SharedMiniClusterBase;
 +import org.apache.accumulo.harness.MiniClusterConfigurationCallback;
 +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 +import org.apache.accumulo.shell.Shell;
 +import org.apache.accumulo.test.functional.SlowIterator;
 +import org.apache.accumulo.tracer.TraceServer;
 +import org.apache.commons.configuration.ConfigurationException;
 +import org.apache.commons.io.FileUtils;
 +import org.apache.commons.lang.StringUtils;
 +import org.apache.hadoop.conf.Configuration;
 +import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +import org.apa

[08/10] accumulo git commit: Merge branch '1.7' into 1.8

2016-08-01 Thread elserj
Merge branch '1.7' into 1.8


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/36f8fcc7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/36f8fcc7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/36f8fcc7

Branch: refs/heads/1.8
Commit: 36f8fcc7f578044b01d0f445b2fab6dc65bb610b
Parents: 74507ae 268922b
Author: Josh Elser 
Authored: Mon Aug 1 16:55:25 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:55:25 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 24 ++--
 1 file changed, 7 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/36f8fcc7/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --cc test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index 61d3d4a,000..8db0185
mode 100644,00..100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@@ -1,1894 -1,0 +1,1884 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.test;
 +
 +import static 
com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 +import static org.junit.Assert.assertEquals;
 +import static org.junit.Assert.assertFalse;
 +import static org.junit.Assert.assertNotNull;
 +import static org.junit.Assert.assertTrue;
 +import static org.junit.Assert.fail;
 +
 +import java.io.BufferedReader;
 +import java.io.File;
 +import java.io.FileReader;
 +import java.io.IOException;
 +import java.io.InputStream;
 +import java.io.OutputStream;
 +import java.io.PrintWriter;
 +import java.lang.reflect.Constructor;
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.Collections;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Map.Entry;
 +import java.util.Random;
 +import java.util.concurrent.TimeUnit;
 +
 +import org.apache.accumulo.core.Constants;
 +import org.apache.accumulo.core.client.ClientConfiguration;
 +import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.IteratorSetting;
 +import org.apache.accumulo.core.client.Scanner;
 +import org.apache.accumulo.core.client.TableNotFoundException;
 +import org.apache.accumulo.core.client.admin.TableOperations;
 +import org.apache.accumulo.core.client.impl.Namespaces;
 +import org.apache.accumulo.core.client.sample.RowSampler;
 +import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 +import org.apache.accumulo.core.client.security.tokens.KerberosToken;
 +import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 +import org.apache.accumulo.core.conf.AccumuloConfiguration;
 +import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.core.data.Key;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.file.FileOperations;
 +import org.apache.accumulo.core.file.FileSKVWriter;
 +import org.apache.accumulo.core.metadata.MetadataTable;
 +import org.apache.accumulo.core.security.Authorizations;
 +import org.apache.accumulo.core.util.format.Formatter;
 +import org.apache.accumulo.core.util.format.FormatterConfig;
 +import org.apache.accumulo.harness.SharedMiniClusterBase;
 +import org.apache.accumulo.harness.MiniClusterConfigurationCallback;
 +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 +import org.apache.accumulo.shell.Shell;
 +import org.apache.accumulo.test.functional.SlowIterator;
 +import org.apache.accumulo.tracer.TraceServer;
 +import org.apache.commons.configuration.ConfigurationException;
 +import org.apache.commons.io.FileUtils;
 +import org.apache.commons.lang.StringUtils;
 +import org.apache.hadoop.conf.Configuration;
 +import org.apache.hadoop.fs.FileSystem;
 +import org.apache.hadoop.fs.Path;
 +import org.apache

[06/10] accumulo git commit: Merge branch '1.6' into 1.7

2016-08-01 Thread elserj
Merge branch '1.6' into 1.7


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/268922b2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/268922b2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/268922b2

Branch: refs/heads/1.7
Commit: 268922b21cb08e05f4d3268c4cbafeeefe75fee7
Parents: 5b80b2a d79776d
Author: Josh Elser 
Authored: Mon Aug 1 16:43:35 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:43:35 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 24 ++--
 1 file changed, 7 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/268922b2/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --cc test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index ced4a6a,95066a5..b7bf85b
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@@ -717,8 -625,10 +707,8 @@@ public class ShellServerIT extends Shar
  ts.exec("getauths", true, "foo", true);
  ts.exec("getauths", true, "bar", true);
  passed = true;
 -  } catch (Exception e) {
 -UtilWaitThread.sleep(500);
 -  } catch (AssertionError e) {
 +  } catch (AssertionError | Exception e) {
- UtilWaitThread.sleep(300);
+ UtilWaitThread.sleep(500);
}
  }
  assertTrue("Could not successfully see updated authoriations", passed);



[03/10] accumulo git commit: ACCUMULO-4394 Fix up ShellServerIT#addauths

2016-08-01 Thread elserj
ACCUMULO-4394 Fix up ShellServerIT#addauths

The first loop did not set success=true upon success and would
always iterate 9 times. We don't have to limit the number of attempts,
instead rely on the junit timeout rule and run for as long as allowed.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d79776d7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d79776d7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d79776d7

Branch: refs/heads/1.8
Commit: d79776d78d47570915a6195e1734807160ae566d
Parents: dcc5dff
Author: Josh Elser 
Authored: Mon Aug 1 16:20:16 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:20:16 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 26 ++--
 1 file changed, 8 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d79776d7/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java 
b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index 77496ce..95066a5 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -598,7 +598,8 @@ public class ShellServerIT extends SharedMiniClusterIT {
 // addauths
 ts.exec("createtable " + table + " -evc");
 boolean success = false;
-for (int i = 0; i < 9 && !success; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!success) {
   try {
 ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
   @Override
@@ -611,34 +612,23 @@ public class ShellServerIT extends SharedMiniClusterIT {
 }
   }
 });
+success = true;
   } catch (AssertionError e) {
-Thread.sleep(200);
+Thread.sleep(500);
   }
 }
-if (!success) {
-  ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
-@Override
-public String getErrorMessage() {
-  try {
-Connector c = getConnector();
-return "Current auths for root are: " + 
c.securityOperations().getUserAuthorizations("root").toString();
-  } catch (Exception e) {
-return "Could not check authorizations";
-  }
-}
-  });
-}
 ts.exec("addauths -s foo,bar", true);
 boolean passed = false;
-for (int i = 0; i < 50 && !passed; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!passed) {
   try {
 ts.exec("getauths", true, "foo", true);
 ts.exec("getauths", true, "bar", true);
 passed = true;
   } catch (Exception e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   } catch (AssertionError e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   }
 }
 assertTrue("Could not successfully see updated authoriations", passed);



[04/10] accumulo git commit: ACCUMULO-4394 Fix up ShellServerIT#addauths

2016-08-01 Thread elserj
ACCUMULO-4394 Fix up ShellServerIT#addauths

The first loop did not set success=true upon success and would
always iterate 9 times. We don't have to limit the number of attempts,
instead rely on the junit timeout rule and run for as long as allowed.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d79776d7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d79776d7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d79776d7

Branch: refs/heads/master
Commit: d79776d78d47570915a6195e1734807160ae566d
Parents: dcc5dff
Author: Josh Elser 
Authored: Mon Aug 1 16:20:16 2016 -0400
Committer: Josh Elser 
Committed: Mon Aug 1 16:20:16 2016 -0400

--
 .../org/apache/accumulo/test/ShellServerIT.java | 26 ++--
 1 file changed, 8 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d79776d7/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java 
b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index 77496ce..95066a5 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -598,7 +598,8 @@ public class ShellServerIT extends SharedMiniClusterIT {
 // addauths
 ts.exec("createtable " + table + " -evc");
 boolean success = false;
-for (int i = 0; i < 9 && !success; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!success) {
   try {
 ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
   @Override
@@ -611,34 +612,23 @@ public class ShellServerIT extends SharedMiniClusterIT {
 }
   }
 });
+success = true;
   } catch (AssertionError e) {
-Thread.sleep(200);
+Thread.sleep(500);
   }
 }
-if (!success) {
-  ts.exec("insert a b c d -l foo", false, "does not have authorization", 
true, new ErrorMessageCallback() {
-@Override
-public String getErrorMessage() {
-  try {
-Connector c = getConnector();
-return "Current auths for root are: " + 
c.securityOperations().getUserAuthorizations("root").toString();
-  } catch (Exception e) {
-return "Could not check authorizations";
-  }
-}
-  });
-}
 ts.exec("addauths -s foo,bar", true);
 boolean passed = false;
-for (int i = 0; i < 50 && !passed; i++) {
+// Rely on the timeout rule in AccumuloIT
+while (!passed) {
   try {
 ts.exec("getauths", true, "foo", true);
 ts.exec("getauths", true, "bar", true);
 passed = true;
   } catch (Exception e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   } catch (AssertionError e) {
-UtilWaitThread.sleep(300);
+UtilWaitThread.sleep(500);
   }
 }
 assertTrue("Could not successfully see updated authoriations", passed);