accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1410388 - in /accumulo/trunk: ./ core/src/test/java/org/apache/accumulo/core/client/mock/ core/src/test/java/org/apache/accumulo/core/iterators/user/ core/src/test/java/org/apache/accumulo/core/util/ core/src/test/java/org/apache/accumulo/...
Date Fri, 16 Nov 2012 15:09:02 GMT
Author: ecn
Date: Fri Nov 16 15:08:59 2012
New Revision: 1410388

URL: http://svn.apache.org/viewvc?rev=1410388&view=rev
Log:
ACCUMULO-857 fix deprecation warnings

Modified:
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
    accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
    accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/TransactionWatcherTest.java
    accumulo/trunk/pom.xml
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java
    accumulo/trunk/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
    accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java
    accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
    accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
    accumulo/trunk/trace/src/test/java/org/apache/accumulo/cloudtrace/instrument/CountSamplerTest.java

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
Fri Nov 16 15:08:59 2012
@@ -16,17 +16,15 @@
  */
 package org.apache.accumulo.core.client.mock;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map.Entry;
 import java.util.Random;
 
-import junit.framework.Assert;
-
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
@@ -343,8 +341,8 @@ public class MockConnectorTest {
       AccumuloSecurityException{
     String name = "an-interesting-instance-name";
     Instance mockInstance = new MockInstance(name);
-    Assert.assertEquals(mockInstance, mockInstance.getConnector("foo", "bar").getInstance());
-    Assert.assertEquals(name, mockInstance.getConnector("foo","bar").getInstance().getInstanceName());
+    assertEquals(mockInstance, mockInstance.getConnector("foo", "bar").getInstance());
+    assertEquals(name, mockInstance.getConnector("foo","bar").getInstance().getInstanceName());
   }
 
 }

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java
Fri Nov 16 15:08:59 2012
@@ -26,7 +26,6 @@ import java.util.Map.Entry;
 import java.util.Random;
 import java.util.TreeMap;
 
-import junit.framework.Assert;
 import junit.framework.TestCase;
 
 import org.apache.accumulo.core.Constants;
@@ -288,10 +287,10 @@ public class IntersectingIteratorTest ex
     bs.addScanIterator(ii);
     bs.setRanges(Collections.singleton(new Range()));
     Iterator<Entry<Key,Value>> iterator = bs.iterator();
-    Assert.assertTrue(iterator.hasNext());
+    assertTrue(iterator.hasNext());
     Entry<Key,Value> next = iterator.next();
     Key key = next.getKey();
-    Assert.assertEquals(key.getColumnQualifier(), new Text("5000000000000000"));
-    Assert.assertFalse(iterator.hasNext());
+    assertEquals(key.getColumnQualifier(), new Text("5000000000000000"));
+    assertFalse(iterator.hasNext());
   }
 }

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
Fri Nov 16 15:08:59 2012
@@ -20,7 +20,7 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import junit.framework.Assert;
+import static org.junit.Assert.*;
 
 import org.apache.accumulo.core.conf.ConfigurationCopy;
 import org.apache.accumulo.core.data.ArrayByteSequence;
@@ -39,18 +39,18 @@ public class LocalityGroupUtilTest {
     conf.set("table.groups.enabled", "lg1");
     try {
       Map<String,Set<ByteSequence>> groups = LocalityGroupUtil.getLocalityGroups(conf);
-      Assert.assertEquals(1, groups.size());
-      Assert.assertNotNull(groups.get("lg1"));
-      Assert.assertEquals(2, groups.get("lg1").size());
-      Assert.assertTrue(groups.get("lg1").contains(new ArrayByteSequence("cf1")));
+      assertEquals(1, groups.size());
+      assertNotNull(groups.get("lg1"));
+      assertEquals(2, groups.get("lg1").size());
+      assertTrue(groups.get("lg1").contains(new ArrayByteSequence("cf1")));
     } catch (LocalityGroupConfigurationError err) {
-      Assert.fail();
+      fail();
     }
     try {
       conf.set("table.group.lg2", "cf1");
       conf.set("table.groups.enabled", "lg1,lg2");
       LocalityGroupUtil.getLocalityGroups(conf);
-      Assert.fail();
+      fail();
     } catch (LocalityGroupConfigurationError err) {}
   }
   
@@ -71,8 +71,8 @@ public class LocalityGroupUtilTest {
     
     ByteSequence bs2 = LocalityGroupUtil.decodeColumnFamily(ecf);
     
-    Assert.assertEquals(bs1, bs2);
-    Assert.assertEquals(ecf, LocalityGroupUtil.encodeColumnFamily(bs2));
+    assertEquals(bs1, bs2);
+    assertEquals(ecf, LocalityGroupUtil.encodeColumnFamily(bs2));
     
     // test encoding multiple column fams containing binary data
     HashSet<Text> in = new HashSet<Text>();
@@ -83,7 +83,7 @@ public class LocalityGroupUtilTest {
     in2.add(new ArrayByteSequence(test2));
     Set<ByteSequence> out = LocalityGroupUtil.decodeColumnFamilies(LocalityGroupUtil.encodeColumnFamilies(in));
     
-    Assert.assertEquals(in2, out);
+    assertEquals(in2, out);
   }
   
 }

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/util/shell/command/FormatterCommandTest.java
Fri Nov 16 15:08:59 2012
@@ -23,7 +23,7 @@ import java.io.Writer;
 import java.util.Iterator;
 import java.util.Map.Entry;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;

Modified: accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
(original)
+++ accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLockTest.java
Fri Nov 16 15:08:59 2012
@@ -21,7 +21,7 @@ import java.util.TreeMap;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 
-import junit.framework.Assert;
+import static org.junit.Assert.*;
 
 import org.apache.accumulo.fate.zookeeper.DistributedReadWriteLock.QueueLock;
 import org.junit.Test;
@@ -67,7 +67,7 @@ public class DistributedReadWriteLockTes
     
     void read() {
       for (int i = 0; i < data.length; i++)
-        Assert.assertEquals(counter, data[i]);
+        assertEquals(counter, data[i]);
     }
     
     void write() {

Modified: accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/TransactionWatcherTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/TransactionWatcherTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/TransactionWatcherTest.java
(original)
+++ accumulo/trunk/fate/src/test/java/org/apache/accumulo/fate/zookeeper/TransactionWatcherTest.java
Fri Nov 16 15:08:59 2012
@@ -22,7 +22,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Callable;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 
 import org.junit.Test;
 

Modified: accumulo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/pom.xml?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/pom.xml (original)
+++ accumulo/trunk/pom.xml Fri Nov 16 15:08:59 2012
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache</groupId>
     <artifactId>apache</artifactId>
-    <version>10</version>
+    <version>11</version>
   </parent>
   <groupId>org.apache.accumulo</groupId>
   <artifactId>accumulo</artifactId>

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java
Fri Nov 16 15:08:59 2012
@@ -17,9 +17,7 @@
 package org.apache.accumulo.server.monitor;
 
 import java.net.InetSocketAddress;
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.List;
 import java.util.SortedSet;
 import java.util.TreeSet;
 

Modified: accumulo/trunk/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
(original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
Fri Nov 16 15:08:59 2012
@@ -23,7 +23,7 @@ import java.util.Map;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;

Modified: accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java
(original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java
Fri Nov 16 15:08:59 2012
@@ -22,7 +22,7 @@ import java.util.Map.Entry;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;

Modified: accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
(original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
Fri Nov 16 15:08:59 2012
@@ -16,10 +16,7 @@
  */
 package org.apache.accumulo.server.master.balancer;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.net.InetSocketAddress;
 import java.util.ArrayList;
@@ -32,8 +29,6 @@ import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.Map.Entry;
 
-import junit.framework.Assert;
-
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
@@ -198,7 +193,7 @@ public class DefaultLoadBalancerTest {
         servers.get(migration.newServer).extents.add(migration.tablet);
       }
     }
-    Assert.assertEquals(8, moved);
+    assertEquals(8, moved);
   }
   
   @Test
@@ -243,7 +238,7 @@ public class DefaultLoadBalancerTest {
       }
     }
     // average is 58, with 2 at 59: we need 48 more moved to the short server
-    Assert.assertEquals(48, moved);
+    assertEquals(48, moved);
   }
   
   private void checkBalance(List<KeyExtent> metadataTable, Map<TServerInstance,FakeTServer>
servers, Map<String,Integer> expectedCounts) {

Modified: accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
(original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
Fri Nov 16 15:08:59 2012
@@ -25,7 +25,7 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.admin.TableOperations;

Modified: accumulo/trunk/trace/src/test/java/org/apache/accumulo/cloudtrace/instrument/CountSamplerTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/trace/src/test/java/org/apache/accumulo/cloudtrace/instrument/CountSamplerTest.java?rev=1410388&r1=1410387&r2=1410388&view=diff
==============================================================================
--- accumulo/trunk/trace/src/test/java/org/apache/accumulo/cloudtrace/instrument/CountSamplerTest.java
(original)
+++ accumulo/trunk/trace/src/test/java/org/apache/accumulo/cloudtrace/instrument/CountSamplerTest.java
Fri Nov 16 15:08:59 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.cloudtrace.instrument;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 
 import org.apache.accumulo.cloudtrace.instrument.CountSampler;
 import org.junit.Test;



Mime
View raw message