You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2013/07/17 04:33:10 UTC
[08/50] [abbrv] ACCUMULO-1481 : Add tests for splitting/merging root
table;
refactor to consolidate metadata constants and structures in an organized way;
begin consolidating metadata ops into a servicer interface to abstract the
code that actually does
http://git-wip-us.apache.org/repos/asf/accumulo/blob/446a37a9/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
index 678eb8d..561d453 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
@@ -40,10 +40,10 @@ import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.SystemPermission;
import org.apache.accumulo.core.security.TablePermission;
-import org.apache.accumulo.core.util.MetadataTable;
import org.apache.hadoop.io.Text;
import org.junit.Test;
@@ -51,7 +51,7 @@ public class PermissionsIT extends MacTest {
private static final String TEST_USER = "test_user";
private static final PasswordToken TEST_PASS = new PasswordToken("test_password");
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void systemPermissionsTest() throws Exception {
// verify that the test is being run by root
Connector c = getConnector();
@@ -87,16 +87,16 @@ public class PermissionsIT extends MacTest {
}
}
- static Map<String, String> map(Iterable<Entry<String,String>> i) {
- Map<String, String> result = new HashMap<String, String>();
- for (Entry<String, String> e : i) {
+ static Map<String,String> map(Iterable<Entry<String,String>> i) {
+ Map<String,String> result = new HashMap<String,String>();
+ for (Entry<String,String> e : i) {
result.put(e.getKey(), e.getValue());
}
return result;
}
private static void testMissingSystemPermission(Connector root_conn, Connector test_user_conn, SystemPermission perm) throws AccumuloException,
- TableExistsException, AccumuloSecurityException, TableNotFoundException {
+ TableExistsException, AccumuloSecurityException, TableNotFoundException {
String tableName, user, password = "password";
log.debug("Confirming that the lack of the " + perm + " permission properly restricts the user");
@@ -196,7 +196,7 @@ public class PermissionsIT extends MacTest {
}
private static void testGrantedSystemPermission(Connector root_conn, Connector test_user_conn, SystemPermission perm) throws AccumuloException,
- AccumuloSecurityException, TableNotFoundException, TableExistsException {
+ AccumuloSecurityException, TableNotFoundException, TableExistsException {
String tableName, user, password = "password";
log.debug("Confirming that the presence of the " + perm + " permission properly permits the user");
@@ -260,7 +260,7 @@ public class PermissionsIT extends MacTest {
}
private static void verifyHasOnlyTheseSystemPermissions(Connector root_conn, String user, SystemPermission... perms) throws AccumuloException,
- AccumuloSecurityException {
+ AccumuloSecurityException {
List<SystemPermission> permList = Arrays.asList(perms);
for (SystemPermission p : SystemPermission.values()) {
if (permList.contains(p)) {
@@ -276,7 +276,7 @@ public class PermissionsIT extends MacTest {
}
private static void verifyHasNoSystemPermissions(Connector root_conn, String user, SystemPermission... perms) throws AccumuloException,
- AccumuloSecurityException {
+ AccumuloSecurityException {
for (SystemPermission p : perms)
if (root_conn.securityOperations().hasSystemPermission(user, p))
throw new IllegalStateException(user + " SHOULD NOT have system permission " + p);
@@ -292,8 +292,7 @@ public class PermissionsIT extends MacTest {
Connector test_user_conn = c.getInstance().getConnector(TEST_USER, TEST_PASS);
// check for read-only access to metadata table
- verifyHasOnlyTheseTablePermissions(c, c.whoami(), MetadataTable.NAME, TablePermission.READ,
- TablePermission.ALTER_TABLE);
+ verifyHasOnlyTheseTablePermissions(c, c.whoami(), MetadataTable.NAME, TablePermission.READ, TablePermission.ALTER_TABLE);
verifyHasOnlyTheseTablePermissions(c, TEST_USER, MetadataTable.NAME, TablePermission.READ);
// test each permission
@@ -313,8 +312,7 @@ public class PermissionsIT extends MacTest {
}
}
- private void createTestTable(Connector c) throws Exception,
- MutationsRejectedException {
+ private void createTestTable(Connector c) throws Exception, MutationsRejectedException {
if (!c.tableOperations().exists(TEST_TABLE)) {
// create the test table
c.tableOperations().create(TEST_TABLE);
@@ -364,8 +362,7 @@ public class PermissionsIT extends MacTest {
writer.close();
} catch (MutationsRejectedException e1) {
if (e1.getAuthorizationFailuresMap().size() > 0)
- throw new AccumuloSecurityException(test_user_conn.whoami(), org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode.PERMISSION_DENIED,
- e1);
+ throw new AccumuloSecurityException(test_user_conn.whoami(), org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode.PERMISSION_DENIED, e1);
}
throw new IllegalStateException("Should NOT be able to write to a table");
} catch (AccumuloSecurityException e) {
@@ -411,7 +408,7 @@ public class PermissionsIT extends MacTest {
}
private static void testGrantedTablePermission(Connector root_conn, Connector test_user_conn, TablePermission perm) throws AccumuloException,
- TableExistsException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException {
+ TableExistsException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException {
Scanner scanner;
BatchWriter writer;
Mutation m;
@@ -451,7 +448,7 @@ public class PermissionsIT extends MacTest {
}
private static void verifyHasOnlyTheseTablePermissions(Connector root_conn, String user, String table, TablePermission... perms) throws AccumuloException,
- AccumuloSecurityException {
+ AccumuloSecurityException {
List<TablePermission> permList = Arrays.asList(perms);
for (TablePermission p : TablePermission.values()) {
if (permList.contains(p)) {
@@ -467,7 +464,7 @@ public class PermissionsIT extends MacTest {
}
private static void verifyHasNoTablePermissions(Connector root_conn, String user, String table, TablePermission... perms) throws AccumuloException,
- AccumuloSecurityException {
+ AccumuloSecurityException {
for (TablePermission p : perms)
if (root_conn.securityOperations().hasTablePermission(user, table, p))
throw new IllegalStateException(user + " SHOULD NOT have table permission " + p + " for table " + table);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/446a37a9/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
index d058724..bc89e20 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
@@ -44,8 +44,9 @@ import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.file.rfile.PrintInfo;
+import org.apache.accumulo.core.metadata.MetadataTable;
+import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.MetadataTable;
import org.apache.accumulo.server.monitor.Monitor;
import org.apache.accumulo.server.util.Admin;
import org.apache.accumulo.test.TestIngest;
@@ -60,7 +61,7 @@ public class ReadWriteIT extends MacTest {
static final int COLS = 1;
static final String COLF = "colf";
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void sunnyDay() throws Exception {
// Start accumulo, create a table, insert some data, verify we can read it out.
// Shutdown cleanly.
@@ -99,6 +100,7 @@ public class ReadWriteIT extends MacTest {
private static void verify(Connector connector, int rows, int cols, int width, int offset) throws Exception {
verify(connector, rows, cols, width, offset, COLF);
}
+
private static void verify(Connector connector, int rows, int cols, int width, int offset, String colf) throws Exception {
ScannerOpts scannerOpts = new ScannerOpts();
VerifyIngest.Opts opts = new VerifyIngest.Opts();
@@ -110,11 +112,11 @@ public class ReadWriteIT extends MacTest {
VerifyIngest.verifyIngest(connector, opts, scannerOpts);
}
- public static String[] args(String ...args) {
+ public static String[] args(String... args) {
return args;
}
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void multiTableTest() throws Exception {
// Write to multiple tables
String instance = cluster.getInstanceName();
@@ -123,7 +125,7 @@ public class ReadWriteIT extends MacTest {
TestMultiTableIngest.main(args("--count", "" + ROWS, "--readonly", "-u", "root", "-i", instance, "-z", keepers, "-p", PASSWORD));
}
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void largeTest() throws Exception {
// write a few large values
Connector connector = getConnector();
@@ -131,13 +133,13 @@ public class ReadWriteIT extends MacTest {
verify(connector, 2, 1, 500000, 0);
}
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void interleaved() throws Exception {
// read and write concurrently
final Connector connector = getConnector();
interleaveTest(connector);
}
-
+
static void interleaveTest(final Connector connector) throws Exception {
final AtomicBoolean fail = new AtomicBoolean(false);
final int CHUNKSIZE = ROWS / 10;
@@ -146,6 +148,7 @@ public class ReadWriteIT extends MacTest {
for (i = 0; i < ROWS; i += CHUNKSIZE) {
final int start = i;
Thread verify = new Thread() {
+ @Override
public void run() {
try {
verify(connector, CHUNKSIZE, 1, 50, start);
@@ -161,7 +164,9 @@ public class ReadWriteIT extends MacTest {
verify(connector, CHUNKSIZE, 1, 50, i);
}
- public static Text t(String s) { return new Text(s); }
+ public static Text t(String s) {
+ return new Text(s);
+ }
public static Mutation m(String row, String cf, String cq, String value) {
Mutation m = new Mutation(t(row));
@@ -169,10 +174,9 @@ public class ReadWriteIT extends MacTest {
return m;
}
-
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void localityGroupPerf() throws Exception {
- // verify that locality groups can make look-ups faster
+ // verify that locality groups can make look-ups faster
final Connector connector = getConnector();
connector.tableOperations().create("test_ingest");
connector.tableOperations().setProperty("test_ingest", "table.group.g1", "colf");
@@ -185,25 +189,27 @@ public class ReadWriteIT extends MacTest {
long now = System.currentTimeMillis();
Scanner scanner = connector.createScanner("test_ingest", Authorizations.EMPTY);
scanner.fetchColumnFamily(new Text("colf"));
- for (@SuppressWarnings("unused") Entry<Key,Value> entry : scanner)
+ for (@SuppressWarnings("unused")
+ Entry<Key,Value> entry : scanner)
;
long diff = System.currentTimeMillis() - now;
now = System.currentTimeMillis();
scanner = connector.createScanner("test_ingest", Authorizations.EMPTY);
scanner.fetchColumnFamily(new Text("colf2"));
- for (@SuppressWarnings("unused") Entry<Key,Value> entry : scanner)
+ for (@SuppressWarnings("unused")
+ Entry<Key,Value> entry : scanner)
;
bw.close();
long diff2 = System.currentTimeMillis() - now;
assertTrue(diff2 < diff);
}
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void sunnyLG() throws Exception {
// create a locality group, write to it and ensure it exists in the RFiles that result
final Connector connector = getConnector();
connector.tableOperations().create("test_ingest");
- Map<String, Set<Text>> groups = new TreeMap<String, Set<Text>>();
+ Map<String,Set<Text>> groups = new TreeMap<String,Set<Text>>();
groups.put("g1", Collections.singleton(t("colf")));
connector.tableOperations().setLocalityGroups("test_ingest", groups);
ingest(connector, 2000, 1, 50, 0);
@@ -212,9 +218,9 @@ public class ReadWriteIT extends MacTest {
BatchScanner bscanner = connector.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 1);
String tableId = connector.tableOperations().tableIdMap().get("test_ingest");
bscanner.setRanges(Collections.singletonList(new Range(new Text(tableId + ";"), new Text(tableId + "<"))));
- bscanner.fetchColumnFamily(MetadataTable.DATAFILE_COLUMN_FAMILY);
+ bscanner.fetchColumnFamily(DataFileColumnFamily.NAME);
boolean foundFile = false;
- for (Entry<Key,Value> entry: bscanner) {
+ for (Entry<Key,Value> entry : bscanner) {
foundFile = true;
Process info = cluster.exec(PrintInfo.class, entry.getKey().getColumnQualifier().toString());
assertEquals(0, info.waitFor());
@@ -226,34 +232,24 @@ public class ReadWriteIT extends MacTest {
assertTrue(foundFile);
}
- @Test(timeout=90*1000)
+ @Test(timeout = 90 * 1000)
public void localityGroupChange() throws Exception {
// Make changes to locality groups and ensure nothing is lostssh
final Connector connector = getConnector();
TableOperations to = connector.tableOperations();
to.create("test_ingest");
- String[] config = new String[] {
- "lg1:colf",
- null,
- "lg1:colf,xyz",
- "lg1:colf,xyz;lg2:c1,c2"
- };
+ String[] config = new String[] {"lg1:colf", null, "lg1:colf,xyz", "lg1:colf,xyz;lg2:c1,c2"};
int i = 0;
for (String cfg : config) {
to.setLocalityGroups("test_ingest", getGroups(cfg));
- ingest(connector, ROWS * (i+1), 1, 50, ROWS * i);
+ ingest(connector, ROWS * (i + 1), 1, 50, ROWS * i);
to.flush("test_ingest", null, null, true);
- verify(connector, 0, 1, 50, ROWS * (i+1));
+ verify(connector, 0, 1, 50, ROWS * (i + 1));
i++;
}
to.delete("test_ingest");
to.create("test_ingest");
- config = new String[] {
- "lg1:colf",
- null,
- "lg1:colf,xyz",
- "lg1:colf;lg2:colf",
- };
+ config = new String[] {"lg1:colf", null, "lg1:colf,xyz", "lg1:colf;lg2:colf",};
i = 1;
for (String cfg : config) {
ingest(connector, ROWS * i, 1, 50, 0);
@@ -265,11 +261,11 @@ public class ReadWriteIT extends MacTest {
i++;
}
}
-
+
private Map<String,Set<Text>> getGroups(String cfg) {
- Map<String, Set<Text>> groups = new TreeMap<String, Set<Text>>();
+ Map<String,Set<Text>> groups = new TreeMap<String,Set<Text>>();
if (cfg != null) {
- for (String group: cfg.split(";")) {
+ for (String group : cfg.split(";")) {
String[] parts = group.split(":");
Set<Text> cols = new HashSet<Text>();
for (String col : parts[1].split(",")) {
@@ -280,5 +276,5 @@ public class ReadWriteIT extends MacTest {
}
return groups;
}
-
+
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/446a37a9/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
index dc4adc2..741e216 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
@@ -16,7 +16,8 @@
*/
package org.apache.accumulo.test.functional;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
@@ -30,8 +31,9 @@ import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.KeyExtent;
import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.metadata.MetadataTable;
+import org.apache.accumulo.core.metadata.schema.MetadataSchema;
import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.MetadataTable;
import org.apache.accumulo.core.util.UtilWaitThread;
import org.apache.accumulo.minicluster.MiniAccumuloConfig;
import org.apache.accumulo.server.util.CheckForMetadataProblems;
@@ -44,13 +46,13 @@ public class SplitIT extends MacTest {
@Override
public void configure(MiniAccumuloConfig cfg) {
- Map<String, String> siteConfig = new HashMap<String, String>();
+ Map<String,String> siteConfig = new HashMap<String,String>();
siteConfig.put(Property.TSERV_MAXMEM.getKey(), "5K");
- siteConfig.put(Property.TSERV_MAJC_DELAY.getKey(), "1");
+ siteConfig.put(Property.TSERV_MAJC_DELAY.getKey(), "1s");
cfg.setSiteConfig(siteConfig);
}
-
- @Test(timeout=60*1000)
+
+ @Test(timeout = 120 * 1000)
public void tabletShouldSplit() throws Exception {
Connector c = getConnector();
c.tableOperations().create("test_ingest");
@@ -62,12 +64,12 @@ public class SplitIT extends MacTest {
VerifyIngest.Opts vopts = new VerifyIngest.Opts();
vopts.rows = opts.rows;
VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
- UtilWaitThread.sleep(10*1000);
+ UtilWaitThread.sleep(15 * 1000);
String id = c.tableOperations().tableIdMap().get("test_ingest");
Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
KeyExtent extent = new KeyExtent(new Text(id), null, null);
s.setRange(extent.toMetadataRange());
- MetadataTable.PREV_ROW_COLUMN.fetch(s);
+ MetadataSchema.TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(s);
int count = 0;
int shortened = 0;
for (Entry<Key,Value> entry : s) {
@@ -78,20 +80,23 @@ public class SplitIT extends MacTest {
}
assertTrue(shortened > 0);
assertTrue(count > 10);
- assertEquals(0, cluster.exec(CheckForMetadataProblems.class, "-i", cluster.getInstanceName(), "-u", "root", "-p", MacTest.PASSWORD, "-z", cluster.getZooKeepers()).waitFor());
+ assertEquals(0,
+ cluster.exec(CheckForMetadataProblems.class, "-i", cluster.getInstanceName(), "-u", "root", "-p", MacTest.PASSWORD, "-z", cluster.getZooKeepers())
+ .waitFor());
}
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void interleaveSplit() throws Exception {
Connector c = getConnector();
c.tableOperations().create("test_ingest");
c.tableOperations().setProperty("test_ingest", Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
+ c.tableOperations().setProperty("test_ingest", Property.TABLE_FILE_COMPRESSION_TYPE.getKey(), "none");
ReadWriteIT.interleaveTest(c);
- UtilWaitThread.sleep(10*1000);
- assertTrue(c.tableOperations().listSplits("test_ingest").size() > 20);
+ UtilWaitThread.sleep(5 * 1000);
+ assertTrue(c.tableOperations().listSplits("test_ingest").size() > 10);
}
- @Test(timeout=120*1000)
+ @Test(timeout = 120 * 1000)
public void deleteSplit() throws Exception {
Connector c = getConnector();
c.tableOperations().create("test_ingest");
http://git-wip-us.apache.org/repos/asf/accumulo/blob/446a37a9/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java b/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java
index d92088e..1d02d91 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java
@@ -1,4 +1,5 @@
package org.apache.accumulo.test.functional;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -15,7 +16,9 @@ package org.apache.accumulo.test.functional;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import java.util.Map.Entry;
@@ -26,9 +29,9 @@ import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.KeyExtent;
import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.util.CachedConfiguration;
-import org.apache.accumulo.core.util.MetadataTable;
import org.apache.accumulo.server.util.Admin;
import org.apache.accumulo.test.TestIngest;
import org.apache.accumulo.test.VerifyIngest;
@@ -37,10 +40,9 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.junit.Test;
-
public class TableIT extends MacTest {
- @Test(timeout=60*1000)
+ @Test(timeout = 60 * 1000)
public void test() throws Exception {
Connector c = getConnector();
c.tableOperations().create("test_ingest");
@@ -52,7 +54,8 @@ public class TableIT extends MacTest {
Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
s.setRange(new KeyExtent(new Text(id), null, null).toMetadataRange());
int count = 0;
- for (@SuppressWarnings("unused") Entry<Key,Value> entry : s) {
+ for (@SuppressWarnings("unused")
+ Entry<Key,Value> entry : s) {
count++;
}
assertTrue(count > 0);
@@ -60,7 +63,8 @@ public class TableIT extends MacTest {
assertTrue(fs.listStatus(new Path(cluster.getConfig().getDir() + "/accumulo/tables/" + id)).length > 0);
c.tableOperations().delete("test_ingest");
count = 0;
- for (@SuppressWarnings("unused") Entry<Key,Value> entry : s) {
+ for (@SuppressWarnings("unused")
+ Entry<Key,Value> entry : s) {
count++;
}
assertEquals(0, count);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/446a37a9/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java b/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
index c9c9d3b..2dc6802 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
@@ -16,6 +16,8 @@
*/
package org.apache.accumulo.test.functional;
+import static org.junit.Assert.fail;
+
import java.util.Collections;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;
@@ -34,7 +36,6 @@ import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.util.UtilWaitThread;
import org.junit.Test;
-import static org.junit.Assert.*;
/**
*
@@ -53,7 +54,7 @@ public class TimeoutIT extends MacTest {
conn.tableOperations().addConstraint("foo1", SlowConstraint.class.getName());
// give constraint time to propagate through zookeeper
- UtilWaitThread.sleep(250);
+ UtilWaitThread.sleep(1000);
BatchWriter bw = conn.createBatchWriter("foo1", new BatchWriterConfig().setTimeout(3, TimeUnit.SECONDS));