accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1499116 [2/2] - in /accumulo/branches/ACCUMULO-CURATOR: ./ core/ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/conf/ examples/ examples/simple/src/main/java/org/apache/accumulo/example...
Date Tue, 02 Jul 2013 21:25:59 GMT
Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java?rev=1499116&r1=1499115&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java
Tue Jul  2 21:25:56 2013
@@ -19,6 +19,7 @@ package org.apache.accumulo.test.functio
 import java.io.IOException;
 import java.util.Map;
 
+import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.IteratorEnvironment;
@@ -27,9 +28,15 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.util.UtilWaitThread;
 
 public class SlowIterator extends WrappingIterator {
+
+  static private final String SLEEP_TIME = "sleepTime";
   
   long sleepTime;
   
+  public static void setSleepTime(IteratorSetting is, long millis) {
+    is.addOption(SLEEP_TIME, Long.toString(millis));  
+  }
+  
   @Override
   public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
     throw new UnsupportedOperationException();
@@ -44,7 +51,7 @@ public class SlowIterator extends Wrappi
   @Override
   public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String>
options, IteratorEnvironment env) throws IOException {
     super.init(source, options, env);
-    sleepTime = Long.parseLong(options.get("sleepTime"));
+    sleepTime = Long.parseLong(options.get(SLEEP_TIME));
   }
   
 }

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java?rev=1499116&r1=1499115&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java
Tue Jul  2 21:25:56 2013
@@ -219,6 +219,7 @@ public class MetadataBatchScanTest {
     Entry<Key,Value> entry : bs) {
       count++;
     }
+    bs.close();
     long t2 = System.currentTimeMillis();
     
     ss.delta1 = (t2 - t1);

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java?rev=1499116&r1=1499115&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java
Tue Jul  2 21:25:56 2013
@@ -36,7 +36,6 @@ import org.apache.accumulo.core.client.C
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -69,13 +68,13 @@ public class AuditMessageTest {
   private static MiniAccumuloCluster accumulo;
   private static File logDir;
   private static List<MiniAccumuloCluster.LogWriter> logWriters;
-  private final String AUDIT_USER_1 = "AuditUser1";
-  private final String AUDIT_USER_2 = "AuditUser2";
-  private final PasswordToken PASSWORD_TOKEN = new PasswordToken("password");
-  private final String OLD_TEST_TABLE_NAME = "apples";
-  private final String NEW_TEST_TABLE_NAME = "oranges";
-  private final String THIRD_TEST_TABLE_NAME = "pears";
-  private final Authorizations auths = new Authorizations("private", "public");
+  private static final String AUDIT_USER_1 = "AuditUser1";
+  private static final String AUDIT_USER_2 = "AuditUser2";
+  private static final String PASSWORD = "password";
+  private static final String OLD_TEST_TABLE_NAME = "apples";
+  private static final String NEW_TEST_TABLE_NAME = "oranges";
+  private static final String THIRD_TEST_TABLE_NAME = "pears";
+  private static final Authorizations auths = new Authorizations("private", "public");
   private static TemporaryFolder folder = new TemporaryFolder();
   
   // Must be static to survive Junit re-initialising the class every time.
@@ -160,7 +159,7 @@ public class AuditMessageTest {
   
   @Before
   public void setup() throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
IOException {
-    conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root",
new PasswordToken("superSecret"));
+    conn = accumulo.getConnector("root", "superSecret");
     
     // I don't want to recreate the instance for every test since it will take ages.
     // If we run every test as non-root users, I can drop these users every test which should
effectively
@@ -182,18 +181,18 @@ public class AuditMessageTest {
     
   }
   
-  @Test
+  @Test(timeout=60*1000)
   @SuppressWarnings("unchecked")
   public void testTableOperationsAudits() throws AccumuloException, AccumuloSecurityException,
TableExistsException, TableNotFoundException, IOException,
       InterruptedException {
     
-    conn.securityOperations().createLocalUser(AUDIT_USER_1, PASSWORD_TOKEN);
+    conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.CREATE_TABLE);
     
     // Connect as Audit User and do a bunch of stuff.
     // Testing activity begins here
-    auditConnector = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector(AUDIT_USER_1,
PASSWORD_TOKEN);
+    auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
     auditConnector.tableOperations().create(OLD_TEST_TABLE_NAME);
     auditConnector.tableOperations().rename(OLD_TEST_TABLE_NAME, NEW_TEST_TABLE_NAME);
     auditConnector.tableOperations().clone(NEW_TEST_TABLE_NAME, OLD_TEST_TABLE_NAME, true,
Collections.EMPTY_MAP, Collections.EMPTY_SET);
@@ -213,18 +212,18 @@ public class AuditMessageTest {
     
   }
   
-  @Test
+  @Test(timeout=60*1000)
   public void testUserOperationsAudits() throws AccumuloSecurityException, AccumuloException,
TableExistsException, InterruptedException, IOException {
     
-    conn.securityOperations().createLocalUser(AUDIT_USER_1, PASSWORD_TOKEN);
+    conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.CREATE_USER);
     grantEverySystemPriv(conn, AUDIT_USER_1);
     
     // Connect as Audit User and do a bunch of stuff.
     // Start testing activities here
-    auditConnector = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector(AUDIT_USER_1,
PASSWORD_TOKEN);
-    auditConnector.securityOperations().createLocalUser(AUDIT_USER_2, PASSWORD_TOKEN);
+    auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
+    auditConnector.securityOperations().createLocalUser(AUDIT_USER_2, new PasswordToken(PASSWORD));
     
     // It seems only root can grant stuff.
     conn.securityOperations().grantSystemPermission(AUDIT_USER_2, SystemPermission.ALTER_TABLE);
@@ -262,18 +261,18 @@ public class AuditMessageTest {
     assertEquals(1, findAuditMessage(auditMessages, "action: dropUser; targetUser: " + AUDIT_USER_2).size());
   }
   
-  @Test
+  @Test(timeout=60*1000)
   public void testImportExportOperationsAudits() throws AccumuloSecurityException, AccumuloException,
TableExistsException, TableNotFoundException,
       IOException, InterruptedException {
     
-    conn.securityOperations().createLocalUser(AUDIT_USER_1, PASSWORD_TOKEN);
+    conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().changeUserAuthorizations(AUDIT_USER_1, auths);
     grantEverySystemPriv(conn, AUDIT_USER_1);
     
     // Connect as Audit User and do a bunch of stuff.
     // Start testing activities here
-    auditConnector = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector(AUDIT_USER_1,
PASSWORD_TOKEN);
+    auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
     auditConnector.tableOperations().create(OLD_TEST_TABLE_NAME);
     
     // Insert some play data
@@ -342,18 +341,18 @@ public class AuditMessageTest {
     
   }
   
-  @Test
+  @Test(timeout=60*1000)
   public void testDataOperationsAudits() throws AccumuloSecurityException, AccumuloException,
TableExistsException, TableNotFoundException, IOException,
       InterruptedException {
     
-    conn.securityOperations().createLocalUser(AUDIT_USER_1, PASSWORD_TOKEN);
+    conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().changeUserAuthorizations(AUDIT_USER_1, auths);
     grantEverySystemPriv(conn, AUDIT_USER_1);
     
     // Connect as Audit User and do a bunch of stuff.
     // Start testing activities here
-    auditConnector = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector(AUDIT_USER_1,
PASSWORD_TOKEN);
+    auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
     auditConnector.tableOperations().create(OLD_TEST_TABLE_NAME);
     
     // Insert some play data
@@ -395,14 +394,14 @@ public class AuditMessageTest {
     
   }
   
-  @Test
+  @Test(timeout=60*1000)
   public void testDeniedAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException,
TableNotFoundException, IOException,
       InterruptedException {
     
     // Create our user with no privs
-    conn.securityOperations().createLocalUser(AUDIT_USER_1, PASSWORD_TOKEN);
+    conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.tableOperations().create(OLD_TEST_TABLE_NAME);
-    auditConnector = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector(AUDIT_USER_1,
PASSWORD_TOKEN);
+    auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
     
     // Start testing activities
     // We should get denied or / failed audit messages here.
@@ -462,7 +461,7 @@ public class AuditMessageTest {
             "operation: denied;.*" + String.format(AuditedSecurityOperation.CAN_DELETE_RANGE_AUDIT_TEMPLATE,
OLD_TEST_TABLE_NAME, "myRow", "myRow~")).size());
   }
   
-  @Test
+  @Test(timeout=60*1000)
   public void testFailedAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException,
TableNotFoundException, IOException,
       InterruptedException {
     

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java?rev=1499116&r1=1499115&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java
Tue Jul  2 21:25:56 2013
@@ -22,10 +22,7 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.Instance;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.admin.TableOperations;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.util.MetadataTable;
 import org.apache.accumulo.minicluster.MiniAccumuloCluster;
 import org.apache.accumulo.minicluster.MiniAccumuloConfig;
@@ -66,8 +63,7 @@ public class MetaSplitTest {
   
   @Test(timeout = 60000)
   public void testMetaSplit() throws Exception {
-    Instance instance = new ZooKeeperInstance(cluster.getConfig().getInstanceName(), cluster.getConfig().getZooKeepers());
-    Connector connector = instance.getConnector("root", new PasswordToken(secret));
+    Connector connector = cluster.getConnector("root", secret);
     TableOperations opts = connector.tableOperations();
     
     for (int i = 1; i <= 10; i++) {

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java?rev=1499116&r1=1499115&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
Tue Jul  2 21:25:56 2013
@@ -34,8 +34,6 @@ import jline.console.ConsoleReader;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
-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;
@@ -132,7 +130,7 @@ public class ShellServerTest {
   }
   
   static void assertGoodExit(String s, boolean stringPresent) {
-    Shell.log.debug(output.get());
+    Shell.log.info(output.get());
     assertEquals(0, shell.getExitCode());
     
     if (s.length() > 0)
@@ -419,8 +417,13 @@ public class ShellServerTest {
   @Test(timeout = 30000)
   public void clearCls() throws Exception {
     // clear/cls
-    exec("cls", true, "[1;1H");
-    exec("clear", true, "[2J");
+    if (shell.getReader().getTerminal().isAnsiSupported()) {
+      exec("cls", true, "[1;1H");
+      exec("clear", true, "[2J");
+    } else {
+      exec("cls", false, "does not support");
+      exec("clear", false, "does not support");
+    }
   }
   
   @Test(timeout = 30000)
@@ -705,8 +708,7 @@ public class ShellServerTest {
       @Override
       public void run() {
         try {
-          ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getConfig().getInstanceName(),
cluster.getConfig().getZooKeepers());
-          Connector connector = instance.getConnector("root", new PasswordToken(secret));
+          Connector connector = cluster.getConnector("root", secret);
           Scanner s = connector.createScanner("t", Authorizations.EMPTY);
           for (@SuppressWarnings("unused")
           Entry<Key,Value> kv : s)

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java?rev=1499116&r1=1499115&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
Tue Jul  2 21:25:56 2013
@@ -35,9 +35,7 @@ import org.apache.accumulo.core.client.B
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.admin.DiskUsage;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.constraints.DefaultKeySizeConstraint;
 import org.apache.accumulo.core.data.Mutation;
@@ -71,8 +69,7 @@ public class TableOperationsIT {
     
     accumuloCluster.start();
     
-    ZooKeeperInstance instance = new ZooKeeperInstance(accumuloCluster.getConfig().getInstanceName(),
accumuloCluster.getConfig().getZooKeepers());
-    connector = instance.getConnector(ROOT, new PasswordToken(ROOT_PASS.getBytes()));
+    connector = accumuloCluster.getConnector(ROOT, ROOT_PASS);
   }
   
   @Test

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java?rev=1499116&r1=1499115&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java
Tue Jul  2 21:25:56 2013
@@ -25,8 +25,6 @@ import org.apache.accumulo.core.client.B
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Mutation;
@@ -86,8 +84,7 @@ public class TestAccumuloSplitRecovery {
     
     for (int tn = 0; tn < 2; tn++) {
       
-      ZooKeeperInstance instance = new ZooKeeperInstance(accumulo.getConfig().getInstanceName(),
accumulo.getConfig().getZooKeepers());
-      Connector connector = instance.getConnector("root", new PasswordToken(secret));
+      Connector connector = accumulo.getConnector("root", secret);
       // create a table and put some data in it
       connector.tableOperations().create(TABLE);
       BatchWriter bw = connector.createBatchWriter(TABLE, new BatchWriterConfig());

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DeleteIT.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DeleteIT.java?rev=1499116&r1=1499098&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DeleteIT.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DeleteIT.java
Tue Jul  2 21:25:56 2013
@@ -32,17 +32,22 @@ public class DeleteIT extends MacTest {
   @Test(timeout=60*1000)
   public void test() throws Exception {
     Connector c = getConnector();
+    c.tableOperations().create("test_ingest");
+    deleteTest(c);
+    assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
+  }
+
+  public static void deleteTest(Connector c) throws Exception {
     VerifyIngest.Opts vopts = new VerifyIngest.Opts();
     TestIngest.Opts opts = new TestIngest.Opts();
-    vopts.rows = opts.rows = 10000;
+    vopts.rows = opts.rows = 1000;
     vopts.cols = opts.cols = 1;
     vopts.random = opts.random = 56;
-    opts.createTable = true;
     TestIngest.ingest(c, opts, new BatchWriterOpts());
     assertEquals(0, cluster.exec(TestRandomDeletes.class, "-p", MacTest.PASSWORD, "-i", cluster.getInstanceName(),
"-z", cluster.getZooKeepers()).waitFor());
     TestIngest.ingest(c, opts, new BatchWriterOpts());
     VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
-    assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
   }
   
+  
 }

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java?rev=1499116&r1=1499098&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
Tue Jul  2 21:25:56 2013
@@ -16,8 +16,7 @@
  */
 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.Collections;
 

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java?rev=1499116&r1=1499098&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
Tue Jul  2 21:25:56 2013
@@ -34,6 +34,7 @@ import org.apache.accumulo.core.cli.Batc
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
+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.security.Authorizations;
@@ -149,6 +150,15 @@ public class FunctionalTestUtils {
     return readAll(new FileInputStream(c.getConfig().getLogDir() + "/" + klass.getSimpleName()
+ "_" + p.hashCode() + ".out"));
   }
   
+  static Mutation nm(String row, String cf, String cq, Value value) {
+    Mutation m = new Mutation(new Text(row));
+    m.put(new Text(cf), new Text(cq), value);
+    return m;
+  }
+  
+  static Mutation nm(String row, String cf, String cq, String value) {
+    return nm(row, cf, cq, new Value(value.getBytes()));
+  }
 
   
 }

Modified: accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java?rev=1499116&r1=1499098&r2=1499116&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
(original)
+++ accumulo/branches/ACCUMULO-CURATOR/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
Tue Jul  2 21:25:56 2013
@@ -56,7 +56,7 @@ import org.junit.Test;
 
 public class ReadWriteIT extends MacTest {
   
-  static final int ROWS = 20000;
+  static final int ROWS = 200000;
   static final int COLS = 1;
   static final String COLF = "colf";
   
@@ -81,11 +81,11 @@ public class ReadWriteIT extends MacTest
     monitor.destroy();
   }
   
-  public void ingest(Connector connector, int rows, int cols, int width, int offset) throws
Exception {
+  public static void ingest(Connector connector, int rows, int cols, int width, int offset)
throws Exception {
     ingest(connector, rows, cols, width, offset, COLF);
   }
   
-  public void ingest(Connector connector, int rows, int cols, int width, int offset, String
colf) throws Exception {
+  public static void ingest(Connector connector, int rows, int cols, int width, int offset,
String colf) throws Exception {
     TestIngest.Opts opts = new TestIngest.Opts();
     opts.rows = rows;
     opts.cols = cols;
@@ -96,10 +96,10 @@ public class ReadWriteIT extends MacTest
     TestIngest.ingest(connector, opts, new BatchWriterOpts());
   }
   
-  private void verify(Connector connector, int rows, int cols, int width, int offset) throws
Exception {
+  private static void verify(Connector connector, int rows, int cols, int width, int offset)
throws Exception {
     verify(connector, rows, cols, width, offset, COLF);
   }
-  private void verify(Connector connector, int rows, int cols, int width, int offset, String
colf) throws Exception {
+  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();
     opts.rows = rows;
@@ -135,6 +135,10 @@ public class ReadWriteIT extends MacTest
   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;
     ingest(connector, CHUNKSIZE, 1, 50, 0);



Mime
View raw message