gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject svn commit: r1505236 [1/2] - in /gora/trunk: ./ gora-accumulo/src/test/java/org/apache/gora/accumulo/store/ gora-accumulo/src/test/java/org/apache/gora/accumulo/util/ gora-cassandra/src/test/java/org/apache/gora/cassandra/store/ gora-core/src/main/java...
Date Sat, 20 Jul 2013 23:06:52 GMT
Author: lewismc
Date: Sat Jul 20 23:06:51 2013
New Revision: 1505236

URL: http://svn.apache.org/r1505236
Log:
GORA-229 Use @Ignore for unimplemented functionality to identify absent tests

Modified:
    gora/trunk/CHANGES.txt
    gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java
    gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/PartitionTest.java
    gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/HexEncoderTest.java
    gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/SignedBinaryEncoderTest.java
    gora/trunk/gora-cassandra/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
    gora/trunk/gora-core/src/main/java/org/apache/gora/persistency/Persistent.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/GoraTestDriver.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/avro/TestPersistentDatumReader.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputSplit.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestPersistentSerialization.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestStateManagerImpl.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/query/impl/TestQueryBase.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/store/TestDataStoreFactory.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestIOUtils.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestWritableUtils.java
    gora/trunk/gora-dynamodb/src/test/java/org/apache/gora/dynamodb/TestDynamoDBStore.java
    gora/trunk/gora-hbase/src/test/java/org/apache/gora/hbase/store/TestHBaseStore.java
    gora/trunk/gora-hbase/src/test/java/org/apache/gora/hbase/util/TestHBaseByteInterface.java

Modified: gora/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/gora/trunk/CHANGES.txt?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/CHANGES.txt (original)
+++ gora/trunk/CHANGES.txt Sat Jul 20 23:06:51 2013
@@ -4,6 +4,8 @@
 
 Gora Change Log
 
+* GORA-229 Use @Ignore for unimplemented functionality to identify absent tests (Apostolos Giannakidis via lewismc)
+
 * GORA-258 writeCapacUnits gets value from wrong attribute (Apostolos Giannakidis via lewismc)
 
 * GORA-256 Add Solr store to gora-tutorial (Scott Stults via lewismc)

Modified: gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java (original)
+++ gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java Sat Jul 20 23:06:51 2013
@@ -24,6 +24,7 @@ import org.apache.gora.store.DataStore;
 import org.apache.gora.store.DataStoreFactory;
 import org.apache.gora.store.DataStoreTestBase;
 import org.apache.hadoop.conf.Configuration;
+import org.junit.Ignore;
 
 /**
  * 
@@ -45,8 +46,8 @@ public class AccumuloStoreTest extends D
   
   //Until GORA-66 is resolved this test will always fail, so 
   //do not run it
+  @Ignore("skipped until GORA-66 is resolved")
   @Override
   public void testDeleteByQueryFields() throws IOException {
-    return;
   }
 }

Modified: gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/PartitionTest.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/PartitionTest.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/PartitionTest.java (original)
+++ gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/PartitionTest.java Sat Jul 20 23:06:51 2013
@@ -20,11 +20,11 @@ import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
-import junit.framework.Assert;
-
 import org.apache.gora.accumulo.encoders.Encoder;
 import org.apache.gora.accumulo.encoders.SignedBinaryEncoder;
 import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * 
@@ -47,17 +47,17 @@ public class PartitionTest {
 
   @Test
   public void test1() {
-    Assert.assertEquals(encl(0x006f000000000000l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {0x00, 0x6f}));
-    Assert.assertEquals(encl(1l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {0, 0, 0, 0, 0, 0, 0, 0}));
-    Assert.assertEquals(encl(0x106f000000000001l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {0x10, 0x6f, 0, 0, 0, 0, 0, 0}));
-    Assert.assertEquals(
+    assertEquals(encl(0x006f000000000000l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {0x00, 0x6f}));
+    assertEquals(encl(1l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {0, 0, 0, 0, 0, 0, 0, 0}));
+    assertEquals(encl(0x106f000000000001l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {0x10, 0x6f, 0, 0, 0, 0, 0, 0}));
+    assertEquals(
         encl(-1l),
         (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
             (byte) 0xff,
             (byte) 0xfe}));
     
-    Assert.assertEquals(encl(0x8000000000000001l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {(byte) 0x80, 0, 0, 0, 0, 0, 0, 0}));
-    Assert.assertEquals(
+    assertEquals(encl(0x8000000000000001l), (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {(byte) 0x80, 0, 0, 0, 0, 0, 0, 0}));
+    assertEquals(
         encl(0x8000000000000000l),
         (long) AccumuloStore.followingKey(encoder, Long.class, new byte[] {(byte) 0x7f, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
             (byte) 0xff,
@@ -67,7 +67,7 @@ public class PartitionTest {
     try {
       AccumuloStore.followingKey(encoder, Long.class,
           new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff});
-      Assert.assertTrue(false);
+      assertTrue(false);
     } catch (IllegalArgumentException iea) {
       
     }
@@ -75,19 +75,19 @@ public class PartitionTest {
   
   @Test
   public void test2() {
-    Assert.assertEquals(encl(0x00ffffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {0x01}));
-    Assert.assertEquals(encl(0x006effffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {0x00, 0x6f}));
-    Assert.assertEquals(encl(0xff6effffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0xff, 0x6f}));
-    Assert.assertEquals(encl(0xfffeffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0xff, (byte) 0xff}));
-    Assert.assertEquals(encl(0l), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0, 0, 0, 0, 0, 0, 0, 0}));
+    assertEquals(encl(0x00ffffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {0x01}));
+    assertEquals(encl(0x006effffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {0x00, 0x6f}));
+    assertEquals(encl(0xff6effffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0xff, 0x6f}));
+    assertEquals(encl(0xfffeffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0xff, (byte) 0xff}));
+    assertEquals(encl(0l), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0, 0, 0, 0, 0, 0, 0, 0}));
     
-    Assert.assertEquals(encl(0x7effffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0x7f}));
-    Assert.assertEquals(encl(0x7fffffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0x80}));
-    Assert.assertEquals(encl(0x80ffffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0x81}));
+    assertEquals(encl(0x7effffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0x7f}));
+    assertEquals(encl(0x7fffffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0x80}));
+    assertEquals(encl(0x80ffffffffffffffl), (long) AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0x81}));
 
     try {
       AccumuloStore.lastPossibleKey(encoder, Long.class, new byte[] {(byte) 0, 0, 0, 0, 0, 0, 0});
-      Assert.assertTrue(false);
+      assertTrue(false);
     } catch (IllegalArgumentException iea) {
       
     }

Modified: gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/HexEncoderTest.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/HexEncoderTest.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/HexEncoderTest.java (original)
+++ gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/HexEncoderTest.java Sat Jul 20 23:06:51 2013
@@ -17,7 +17,7 @@
 package org.apache.gora.accumulo.util;
 
 import org.apache.gora.accumulo.encoders.HexEncoder;
-import org.junit.Assert;
+import static org.junit.Assert.assertEquals;
 import org.junit.Test;
 
 /**
@@ -29,12 +29,12 @@ public class HexEncoderTest {
   public void testByte() {
     HexEncoder encoder = new HexEncoder();
     
-    Assert.assertEquals("12", new String(encoder.encodeByte((byte) 0x12)));
-    Assert.assertEquals("f2", new String(encoder.encodeByte((byte) 0xf2)));
+    assertEquals("12", new String(encoder.encodeByte((byte) 0x12)));
+    assertEquals("f2", new String(encoder.encodeByte((byte) 0xf2)));
     
     byte b = Byte.MIN_VALUE;
     while (b != Byte.MAX_VALUE) {
-      Assert.assertEquals(b, encoder.decodeByte(encoder.encodeByte(b)));
+      assertEquals(b, encoder.decodeByte(encoder.encodeByte(b)));
       b++;
     }
   }
@@ -43,12 +43,12 @@ public class HexEncoderTest {
   public void testShort() {
     HexEncoder encoder = new HexEncoder();
     
-    Assert.assertEquals("1234", new String(encoder.encodeShort((short) 0x1234)));
-    Assert.assertEquals("f234", new String(encoder.encodeShort((short) 0xf234)));
+    assertEquals("1234", new String(encoder.encodeShort((short) 0x1234)));
+    assertEquals("f234", new String(encoder.encodeShort((short) 0xf234)));
     
     short s = Short.MIN_VALUE;
     while (s != Short.MAX_VALUE) {
-      Assert.assertEquals(s, encoder.decodeShort(encoder.encodeShort(s)));
+      assertEquals(s, encoder.decodeShort(encoder.encodeShort(s)));
       s++;
     }
   }

Modified: gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/SignedBinaryEncoderTest.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/SignedBinaryEncoderTest.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/SignedBinaryEncoderTest.java (original)
+++ gora/trunk/gora-accumulo/src/test/java/org/apache/gora/accumulo/util/SignedBinaryEncoderTest.java Sat Jul 20 23:06:51 2013
@@ -19,11 +19,11 @@ package org.apache.gora.accumulo.util;
 import java.util.ArrayList;
 import java.util.Collections;
 
-import junit.framework.Assert;
-
 import org.apache.gora.accumulo.encoders.SignedBinaryEncoder;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * 
@@ -38,10 +38,10 @@ public class SignedBinaryEncoderTest {
 
     while (true) {
       byte[] enc = encoder.encodeShort(s);
-      Assert.assertEquals(s, encoder.decodeShort(enc));
+      assertEquals(s, encoder.decodeShort(enc));
       Text current = new Text(enc);
       if (prev != null)
-        Assert.assertTrue(prev.compareTo(current) < 0);
+        assertTrue(prev.compareTo(current) < 0);
       prev = current;
       s++;
       if (s == Short.MAX_VALUE)
@@ -57,10 +57,10 @@ public class SignedBinaryEncoderTest {
 
     while (true) {
       byte[] enc = encoder.encodeInt(i);
-      Assert.assertEquals(i, encoder.decodeInt(enc));
+      assertEquals(i, encoder.decodeInt(enc));
       Text current = new Text(enc);
       if (prev != null)
-        Assert.assertTrue(prev.compareTo(current) < 0);
+        assertTrue(prev.compareTo(current) < 0);
       prev = current;
       i++;
       if (i == finish)
@@ -83,10 +83,10 @@ public class SignedBinaryEncoderTest {
 
     while (true) {
       byte[] enc = encoder.encodeLong(l);
-      Assert.assertEquals(l, encoder.decodeLong(enc));
+      assertEquals(l, encoder.decodeLong(enc));
       Text current = new Text(enc);
       if (prev != null)
-        Assert.assertTrue(prev.compareTo(current) < 0);
+        assertTrue(prev.compareTo(current) < 0);
       prev = current;
       l++;
       if (l == finish)
@@ -124,9 +124,9 @@ public class SignedBinaryEncoderTest {
 
     for (int i = 0; i < testData.size(); i++) {
       byte[] enc = encoder.encodeDouble(testData.get(i));
-      Assert.assertEquals(testData.get(i), encoder.decodeDouble(enc));
+      assertEquals(testData.get(i), (Double) encoder.decodeDouble(enc));
       if (i > 1) {
-        Assert.assertTrue("Checking " + testData.get(i) + " > " + testData.get(i - 1),
+        assertTrue("Checking " + testData.get(i) + " > " + testData.get(i - 1),
             new Text(enc).compareTo(new Text(encoder.encodeDouble(testData.get(i - 1)))) > 0);
       }
     }
@@ -155,9 +155,9 @@ public class SignedBinaryEncoderTest {
 
     for (int i = 0; i < testData.size(); i++) {
       byte[] enc = encoder.encodeFloat(testData.get(i));
-      Assert.assertEquals(testData.get(i), encoder.decodeFloat(enc));
+      assertEquals(testData.get(i), (Float)encoder.decodeFloat(enc));
       if (i > 1) {
-        Assert.assertTrue("Checking " + testData.get(i) + " > " + testData.get(i - 1),
+        assertTrue("Checking " + testData.get(i) + " > " + testData.get(i - 1),
             new Text(enc).compareTo(new Text(encoder.encodeFloat(testData.get(i - 1)))) > 0);
       }
     }

Modified: gora/trunk/gora-cassandra/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-cassandra/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-cassandra/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java (original)
+++ gora/trunk/gora-cassandra/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java Sat Jul 20 23:06:51 2013
@@ -26,79 +26,91 @@ package org.apache.gora.cassandra.store;
 import java.io.IOException;
 
 import org.apache.gora.cassandra.GoraCassandraTestDriver;
-import org.apache.gora.cassandra.store.CassandraStore;
 import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.examples.generated.WebPage;
 import org.apache.gora.store.DataStore;
 import org.apache.gora.store.DataStoreFactory;
 import org.apache.gora.store.DataStoreTestBase;
 import org.apache.hadoop.conf.Configuration;
-import org.junit.After;
 import org.junit.Before;
-import org.junit.Test;
+import org.junit.Ignore;
 
 /**
  * Test for CassandraStore.
  */
 public class TestCassandraStore extends DataStoreTestBase{
-	
+
   private Configuration conf;
-	
+
   static {
     setTestDriver(new GoraCassandraTestDriver());
   }
-	
+
   @Before
   public void setUp() throws Exception {
     super.setUp();
   }
-	
+
   @SuppressWarnings("unchecked")
   @Override
   protected DataStore<String, Employee> createEmployeeDataStore() throws IOException {
     return DataStoreFactory.getDataStore(CassandraStore.class, String.class, Employee.class, conf);
   }
-	
+
   @SuppressWarnings("unchecked")
   @Override
   protected DataStore<String, WebPage> createWebPageDataStore() throws IOException {
     return DataStoreFactory.getDataStore(CassandraStore.class, String.class, WebPage.class, conf);
   }
-	
+
   public GoraCassandraTestDriver getTestDriver() {
     return (GoraCassandraTestDriver) testDriver;
   }
-	
+
 
 // ============================================================================
-  //We need to skip the following tests for a while until we fix some issues..
-  
+    //We need to skip the following tests for a while until we fix some issues..
+
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testGetWebPageDefaultFields() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testQuery() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testQueryStartKey() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testQueryEndKey() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testQueryKeyRange() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testQueryWebPageSingleKeyDefaultFields() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testDelete() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testDeleteByQuery() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testDeleteByQueryFields() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testGetPartitions() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testGetRecursive() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testGetDoubleRecursive() throws IOException{}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testGetNested() throws IOException {}
+  @Ignore("skipped until some bugs are fixed")
   @Override
   public void testGet3UnionField() throws IOException {}
 // ============================================================================
@@ -106,11 +118,10 @@ public class TestCassandraStore extends 
 
   public static void main(String[] args) throws Exception {
     TestCassandraStore test = new TestCassandraStore();
-    test.setUpClass();
+    setUpClass();
     test.setUp();
-    
+
     test.tearDown();
-    test.tearDownClass();
+    tearDownClass();
   }
-
 }

Modified: gora/trunk/gora-core/src/main/java/org/apache/gora/persistency/Persistent.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/main/java/org/apache/gora/persistency/Persistent.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/main/java/org/apache/gora/persistency/Persistent.java (original)
+++ gora/trunk/gora-core/src/main/java/org/apache/gora/persistency/Persistent.java Sat Jul 20 23:06:51 2013
@@ -182,4 +182,4 @@ public interface Persistent extends Clon
   
   Persistent clone();
 
-}
+}
\ No newline at end of file

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/GoraTestDriver.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/GoraTestDriver.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/GoraTestDriver.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/GoraTestDriver.java Sat Jul 20 23:06:51 2013
@@ -105,6 +105,7 @@ public class GoraTestDriver {
         (Class<? extends DataStore<K,T>>)dataStoreClass, keyClass, persistentClass, conf);
     dataStores.add(dataStore);
 
+    log.info("Datastore for "+persistentClass+" was added.");
     return dataStore;
   }
   

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/avro/TestPersistentDatumReader.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/avro/TestPersistentDatumReader.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/avro/TestPersistentDatumReader.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/avro/TestPersistentDatumReader.java Sat Jul 20 23:06:51 2013
@@ -20,15 +20,11 @@ package org.apache.gora.avro;
 
 import java.io.IOException;
 
-import junit.framework.Assert;
-
 import org.apache.avro.util.Utf8;
-import org.apache.gora.avro.PersistentDatumReader;
 import org.apache.gora.examples.WebPageDataCreator;
 import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.examples.generated.WebPage;
 import org.apache.gora.memory.store.MemStore;
-import org.apache.gora.persistency.Persistent;
 import org.apache.gora.persistency.impl.PersistentBase;
 import org.apache.gora.query.Query;
 import org.apache.gora.query.Result;
@@ -37,6 +33,8 @@ import org.apache.gora.store.DataStoreFa
 import org.apache.gora.store.DataStoreTestUtil;
 import org.apache.hadoop.conf.Configuration;
 import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Test case for {@link PersistentDatumReader}.
@@ -53,8 +51,8 @@ public class TestPersistentDatumReader {
   }
   
   private void assertClone(PersistentBase persistent, PersistentBase cloned) {
-    Assert.assertNotNull("cloned object is null", cloned);
-    Assert.assertEquals("cloned object is not equal to original object", persistent, cloned);
+    assertNotNull("cloned object is null", cloned);
+    assertEquals("cloned object is not equal to original object", persistent, cloned);
   }
   
   @Test
@@ -101,6 +99,6 @@ public class TestPersistentDatumReader {
       testClone(page);
       tested++;
     }
-    Assert.assertEquals(WebPageDataCreator.URLS.length, tested);
+    assertEquals(WebPageDataCreator.URLS.length, tested);
   }
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java Sat Jul 20 23:06:51 2013
@@ -24,8 +24,6 @@ import static org.apache.gora.examples.W
 
 import java.io.IOException;
 
-import junit.framework.Assert;
-
 import org.apache.gora.avro.store.AvroStore.CodecType;
 import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.examples.generated.WebPage;
@@ -40,6 +38,7 @@ import org.apache.hadoop.fs.Path;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Test case for {@link AvroStore}.
@@ -147,7 +146,7 @@ public class TestAvroStore {
       DataStoreTestUtil.assertWebPage(page, URL_INDEXES.get(page.getUrl().toString()));
       i++;
     }
-    Assert.assertEquals(i, URLS.length);
+    assertEquals(i, URLS.length);
   }
 
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java Sat Jul 20 23:06:51 2013
@@ -32,7 +32,8 @@ import org.apache.gora.query.Query;
 import org.apache.gora.store.DataStore;
 import org.apache.gora.store.impl.DataStoreBase;
 import org.apache.hadoop.conf.Configuration;
-import org.junit.Assert;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 public class MapReduceTestUtils {
 
@@ -59,7 +60,7 @@ public class MapReduceTestUtils {
     log.info("finished count query job");
     
     //assert results
-    Assert.assertEquals(WebPageDataCreator.URLS.length, result);
+    assertEquals(WebPageDataCreator.URLS.length, result);
   }
  
   public static void testWordCount(Configuration conf, DataStore<String,WebPage> inStore, DataStore<String,
@@ -95,7 +96,7 @@ public class MapReduceTestUtils {
   private static void assertTokenCount(DataStore<String, TokenDatum> outStore,
       String token, int count) throws Exception {
     TokenDatum datum = outStore.get(token, null);
-    Assert.assertNotNull("token:" + token + " cannot be found in datastore", datum);
-    Assert.assertEquals("count for token:" + token + " is wrong", count, datum.getCount());
+    assertNotNull("token:" + token + " cannot be found in datastore", datum);
+    assertEquals("count for token:" + token + " is wrong", count, datum.getCount());
   }
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java Sat Jul 20 23:06:51 2013
@@ -22,11 +22,7 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 
-import junit.framework.Assert;
-
 import org.apache.gora.examples.generated.Employee;
-import org.apache.gora.mapreduce.GoraInputFormat;
-import org.apache.gora.mapreduce.GoraInputSplit;
 import org.apache.gora.mock.persistency.MockPersistent;
 import org.apache.gora.mock.query.MockQuery;
 import org.apache.gora.mock.store.MockDataStore;
@@ -34,6 +30,7 @@ import org.apache.gora.query.PartitionQu
 import org.apache.hadoop.mapreduce.InputSplit;
 import org.apache.hadoop.mapreduce.Job;
 import org.junit.Test;
+import static org.junit.Assert.assertTrue;
 
 public class TestGoraInputFormat {
 
@@ -60,11 +57,11 @@ public class TestGoraInputFormat {
   public void testGetSplits() throws IOException, InterruptedException {
     List<InputSplit> splits = getInputSplits();
 
-    Assert.assertTrue(splits.size() > 0);
+    assertTrue(splits.size() > 0);
 
     InputSplit split = splits.get(0);
     PartitionQuery query = ((GoraInputSplit)split).getQuery();
-    Assert.assertTrue(Arrays.equals(Employee._ALL_FIELDS, query.getFields()));
+    assertTrue(Arrays.equals(Employee._ALL_FIELDS, query.getFields()));
   }
 
 }
\ No newline at end of file

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputSplit.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputSplit.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputSplit.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputSplit.java Sat Jul 20 23:06:51 2013
@@ -21,9 +21,6 @@ package org.apache.gora.mapreduce;
 import java.io.IOException;
 import java.util.List;
 
-import junit.framework.Assert;
-
-import org.apache.gora.mapreduce.GoraInputSplit;
 import org.apache.gora.mock.persistency.MockPersistent;
 import org.apache.gora.mock.query.MockQuery;
 import org.apache.gora.mock.store.MockDataStore;
@@ -31,6 +28,7 @@ import org.apache.gora.query.PartitionQu
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.TestWritable;
 import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Test case for {@link GoraInputSplit}.
@@ -44,7 +42,7 @@ public class TestGoraInputSplit {
     MockDataStore store = MockDataStore.get();
     MockQuery query = store.newQuery();
 
-    List<PartitionQuery<String, MockPersistent>> partitions = 
+    List<PartitionQuery<String, MockPersistent>> partitions =
       store.getPartitions(query);
     return partitions;
   }
@@ -54,11 +52,11 @@ public class TestGoraInputSplit {
     List<PartitionQuery<String, MockPersistent>> partitions = 
       getPartitions();
 
-    int i=0;;
+    int i=0;
     for(PartitionQuery<String, MockPersistent> partition : partitions) {
       GoraInputSplit split = new GoraInputSplit(conf, partition);
-      Assert.assertEquals(split.getLocations().length, 1);
-      Assert.assertEquals(split.getLocations()[0], MockDataStore.LOCATIONS[i++]);
+      assertEquals(split.getLocations().length, 1);
+      assertEquals(split.getLocations()[0], MockDataStore.LOCATIONS[i++]);
     }
   }
 

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestPersistentSerialization.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestPersistentSerialization.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestPersistentSerialization.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/TestPersistentSerialization.java Sat Jul 20 23:06:51 2013
@@ -18,15 +18,10 @@
 
 package org.apache.gora.mapreduce;
 
-import junit.framework.Assert;
-
 import org.apache.avro.util.Utf8;
 import org.apache.gora.examples.WebPageDataCreator;
 import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.examples.generated.WebPage;
-import org.apache.gora.mapreduce.PersistentDeserializer;
-import org.apache.gora.mapreduce.PersistentSerialization;
-import org.apache.gora.mapreduce.PersistentSerializer;
 import org.apache.gora.memory.store.MemStore;
 import org.apache.gora.query.Result;
 import org.apache.gora.store.DataStoreFactory;
@@ -34,6 +29,7 @@ import org.apache.gora.store.DataStoreTe
 import org.apache.gora.util.TestIOUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /** Test class for {@link PersistentSerialization}, {@link PersistentSerializer}
  *  and {@link PersistentDeserializer}
@@ -85,7 +81,7 @@ public class TestPersistentSerialization
       TestIOUtils.testSerializeDeserialize(page);
       i++;
     }
-    Assert.assertEquals(WebPageDataCreator.URLS.length, i);
+    assertEquals(WebPageDataCreator.URLS.length, i);
   }
 
   @Test

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java Sat Jul 20 23:06:51 2013
@@ -18,11 +18,9 @@
 
 package org.apache.gora.persistency;
 
-import org.apache.avro.Schema; 
-import org.apache.avro.generic.GenericData;
+import org.apache.avro.Schema;
 import org.apache.avro.util.Utf8;
-import org.apache.gora.persistency.ListGenericArray; 
-import org.junit.Assert;
+import static org.junit.Assert.assertFalse;
 import org.junit.Test;
 
 /**
@@ -41,7 +39,7 @@ public class TestListGenericArray {
     catch (StackOverflowError e) {
       stackOverflowError = true;
     }
-    Assert.assertFalse(stackOverflowError);
+    assertFalse(stackOverflowError);
   }
   
   @Test
@@ -54,6 +52,6 @@ public class TestListGenericArray {
     } catch (StackOverflowError e) {
       stackOverflowError = true;
     }
-    Assert.assertFalse(stackOverflowError);
+    assertFalse(stackOverflowError);
   }
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java Sat Jul 20 23:06:51 2013
@@ -28,7 +28,10 @@ import org.apache.gora.memory.store.MemS
 import org.apache.gora.store.DataStoreFactory;
 import org.apache.gora.store.DataStoreTestUtil;
 import org.apache.hadoop.conf.Configuration;
-import org.junit.Assert;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
 import org.junit.Test;
 
 /**
@@ -40,7 +43,7 @@ public class TestPersistentBase {
   public void testGetFields() {
     WebPage page = new WebPage();
     String[] fields = page.getFields();
-    Assert.assertArrayEquals(WebPage._ALL_FIELDS, fields);
+    assertArrayEquals(WebPage._ALL_FIELDS, fields);
   }
   
   @Test
@@ -48,7 +51,7 @@ public class TestPersistentBase {
     WebPage page = new WebPage();
     for(int i=0; i<WebPage._ALL_FIELDS.length; i++) {
       String field = page.getField(i);
-      Assert.assertEquals(WebPage._ALL_FIELDS[i], field);
+      assertEquals(WebPage._ALL_FIELDS[i], field);
     }
   }
   
@@ -57,7 +60,7 @@ public class TestPersistentBase {
     WebPage page = new WebPage();
     for(int i=0; i<WebPage._ALL_FIELDS.length; i++) {
       int index = page.getFieldIndex(WebPage._ALL_FIELDS[i]);
-      Assert.assertEquals(i, index);
+      assertEquals(i, index);
     }
   }
   
@@ -66,12 +69,12 @@ public class TestPersistentBase {
     WebPage page = new WebPage();
     for(int i=0; i<WebPage._ALL_FIELDS.length; i++) {
       int index = page.getFieldIndex(WebPage._ALL_FIELDS[i]);
-      Assert.assertEquals(i, index);
+      assertEquals(i, index);
     }
     Employee employee = new Employee();
     for(int i=0; i<Employee._ALL_FIELDS.length; i++) {
       int index = employee.getFieldIndex(Employee._ALL_FIELDS[i]);
-      Assert.assertEquals(i, index);
+      assertEquals(i, index);
     }
   }
   
@@ -87,10 +90,10 @@ public class TestPersistentBase {
     
     page.clear();
     
-    Assert.assertNull(page.getUrl());
-    Assert.assertEquals(0, page.getParsedContent().size());
-    Assert.assertEquals(0, page.getOutlinks().size());
-    Assert.assertNull(page.getContent());
+    assertNull(page.getUrl());
+    assertEquals(0, page.getParsedContent().size());
+    assertEquals(0, page.getOutlinks().size());
+    assertNull(page.getContent());
     
     //set fields again
     page.setUrl(new Utf8("http://bar.com"));
@@ -116,6 +119,6 @@ public class TestPersistentBase {
 
     Employee employee = DataStoreTestUtil.createEmployee(store);
     
-    Assert.assertEquals(employee, employee.clone());
+    assertEquals(employee, employee.clone());
   }
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestStateManagerImpl.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestStateManagerImpl.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestStateManagerImpl.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/impl/TestStateManagerImpl.java Sat Jul 20 23:06:51 2013
@@ -20,14 +20,14 @@ package org.apache.gora.persistency.impl
 
 import java.io.IOException;
 
-import junit.framework.Assert;
-
 import org.apache.avro.util.Utf8;
 import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.mock.persistency.MockPersistent;
 import org.apache.gora.persistency.impl.StateManagerImpl;
 import org.junit.Before;
 import org.junit.Test;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
 
 /**
  * Test case for {@link StateManagerImpl}
@@ -45,71 +45,71 @@ public class TestStateManagerImpl {
   
   @Test
   public void testDirty() {
-    Assert.assertFalse(stateManager.isDirty(persistent));
+    assertFalse(stateManager.isDirty(persistent));
     stateManager.setDirty(persistent);
-    Assert.assertTrue(stateManager.isDirty(persistent));
+    assertTrue(stateManager.isDirty(persistent));
   }
   
   @Test
   public void testDirty2() {
-    Assert.assertFalse(stateManager.isDirty(persistent, 0));
-    Assert.assertFalse(stateManager.isDirty(persistent, 1));
+    assertFalse(stateManager.isDirty(persistent, 0));
+    assertFalse(stateManager.isDirty(persistent, 1));
     stateManager.setDirty(persistent, 0);
-    Assert.assertTrue(stateManager.isDirty(persistent, 0));
-    Assert.assertFalse(stateManager.isDirty(persistent, 1));
+    assertTrue(stateManager.isDirty(persistent, 0));
+    assertFalse(stateManager.isDirty(persistent, 1));
   }
   
   @Test
   public void testClearDirty() {
-    Assert.assertFalse(stateManager.isDirty(persistent));
+    assertFalse(stateManager.isDirty(persistent));
     stateManager.setDirty(persistent, 0);
     stateManager.clearDirty(persistent);
-    Assert.assertFalse(this.stateManager.isDirty(persistent));
+    assertFalse(this.stateManager.isDirty(persistent));
   }
   
   @Test
   public void testReadable() throws IOException {
-    Assert.assertFalse(stateManager.isReadable(persistent, 0));
-    Assert.assertFalse(stateManager.isReadable(persistent, 1));
+    assertFalse(stateManager.isReadable(persistent, 0));
+    assertFalse(stateManager.isReadable(persistent, 1));
     stateManager.setReadable(persistent, 0);
-    Assert.assertTrue(stateManager.isReadable(persistent, 0));
-    Assert.assertFalse(stateManager.isReadable(persistent, 1));
+    assertTrue(stateManager.isReadable(persistent, 0));
+    assertFalse(stateManager.isReadable(persistent, 1));
   }
 
   @Test
   public void testReadable2() {
     stateManager = new StateManagerImpl();
     Employee employee = new Employee(stateManager);
-    Assert.assertFalse(stateManager.isReadable(employee, 0));
-    Assert.assertFalse(stateManager.isReadable(employee, 1));
+    assertFalse(stateManager.isReadable(employee, 0));
+    assertFalse(stateManager.isReadable(employee, 1));
     employee.setName(new Utf8("foo"));
-    Assert.assertTrue(stateManager.isReadable(employee, 0));
-    Assert.assertFalse(stateManager.isReadable(employee, 1));
+    assertTrue(stateManager.isReadable(employee, 0));
+    assertFalse(stateManager.isReadable(employee, 1));
   }
   
   @Test
   public void testClearReadable() {
     stateManager.setReadable(persistent, 0);
     stateManager.clearReadable(persistent);
-    Assert.assertFalse(stateManager.isReadable(persistent, 0));
+    assertFalse(stateManager.isReadable(persistent, 0));
   }
   
   @Test
   public void testIsNew() {
     //newly created objects should be new
-    Assert.assertTrue(persistent.isNew());
+    assertTrue(persistent.isNew());
   }
   
   @Test
   public void testNew() {
     stateManager.setNew(persistent);
-    Assert.assertTrue(persistent.isNew());
+    assertTrue(persistent.isNew());
   }
   
   @Test
   public void testClearNew() {
     stateManager.clearNew(persistent);
-    Assert.assertFalse(persistent.isNew());
+    assertFalse(persistent.isNew());
   }
   
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/query/impl/TestQueryBase.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/query/impl/TestQueryBase.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/query/impl/TestQueryBase.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/query/impl/TestQueryBase.java Sat Jul 20 23:06:51 2013
@@ -16,17 +16,15 @@
  * limitations under the License.
  */
 
-
 package org.apache.gora.query.impl;
 
-import junit.framework.Assert;
-
 import org.apache.gora.mock.query.MockQuery;
 import org.apache.gora.mock.store.MockDataStore;
 import org.apache.gora.query.impl.QueryBase;
 import org.apache.gora.util.TestIOUtils;
 import org.junit.Before;
 import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Test case for {@link QueryBase}.
@@ -51,7 +49,7 @@ public class TestQueryBase {
     query.setKeyRange(START_KEY, END_KEY);
     TestIOUtils.testSerializeDeserialize(query);
     
-    Assert.assertNotNull(query.getDataStore());
+    assertNotNull(query.getDataStore());
   }
   
   @Test

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java Sat Jul 20 23:06:51 2013
@@ -21,8 +21,6 @@ package org.apache.gora.store;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 
-import junit.framework.Assert;
-
 import org.apache.avro.util.Utf8;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -30,12 +28,13 @@ import org.apache.gora.GoraTestDriver;
 import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.examples.generated.Metadata;
 import org.apache.gora.examples.generated.WebPage;
-import org.apache.gora.store.DataStore;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * A base class for {@link DataStore} tests. This is just a convenience
@@ -57,7 +56,7 @@ public abstract class DataStoreTestBase 
 
   @Deprecated
   protected abstract DataStore<String,WebPage> createWebPageDataStore() throws IOException;
-  
+
 
   /** junit annoyingly forces BeforeClass to be static, so this method
    * should be called from a static block
@@ -67,7 +66,7 @@ public abstract class DataStoreTestBase 
   }
 
   private static boolean setUpClassCalled = false;
-  
+
   @BeforeClass
   public static void setUpClass() throws Exception {
     if(testDriver != null && !setUpClassCalled) {
@@ -88,12 +87,12 @@ public abstract class DataStoreTestBase 
   @Before
   public void setUp() throws Exception {
     //There is an issue in JUnit 4 tests in Eclipse where TestSqlStore static
-    //methods are not called BEFORE setUpClass. I think this is a bug in 
+    //methods are not called BEFORE setUpClass. I think this is a bug in
     //JUnitRunner in Eclipse. Below is a workaround for that problem.
     if(!setUpClassCalled) {
-    	setUpClass();  
+      setUpClass();
     }
-    
+
     log.info("setting up test");
     if(testDriver != null) {
       employeeStore = testDriver.createDataStore(String.class, Employee.class);
@@ -131,7 +130,9 @@ public abstract class DataStoreTestBase 
     assertSchemaExists("Employee");
   }
 
+
   // Override this to assert that schema is created correctly
+
   public void assertSchemaExists(String schemaName) throws Exception {
   }
 
@@ -184,7 +185,7 @@ public abstract class DataStoreTestBase 
 
     webPageStore.createSchema();
     WebPage page = webPageStore.newPersistent();
-    Metadata metadata = new Metadata();  
+    Metadata metadata = new Metadata();
     metadata.setVersion(1);
     metadata.putToData(new Utf8("foo"), new Utf8("baz"));
 
@@ -196,9 +197,9 @@ public abstract class DataStoreTestBase 
 
     page = webPageStore.get(revUrl);
     metadata = page.getMetadata();
-    Assert.assertNotNull(metadata);
-    Assert.assertEquals(1, metadata.getVersion());
-    Assert.assertEquals(new Utf8("baz"), metadata.getData().get(new Utf8("foo")));
+    assertNotNull(metadata);
+    assertEquals(1, metadata.getVersion());
+    assertEquals(new Utf8("baz"), metadata.getData().get(new Utf8("foo")));
   }
 
   @Test
@@ -301,7 +302,7 @@ public abstract class DataStoreTestBase 
     log.info("test method: testGetDoubleRecursive") ;
     DataStoreTestUtil.testGetEmployeeDoubleRecursive(employeeStore) ;
   }
-  
+
   @Test
   /**
    * Tests put and get a record with a nested record (not recursive)
@@ -313,7 +314,7 @@ public abstract class DataStoreTestBase 
     log.info("test method: testGetNested") ;
     DataStoreTestUtil.testGetEmployeeNested(employeeStore) ;
   }
-  
+
   @Test
   /**
    * Tests put and get a record with a 3 types union, and
@@ -325,7 +326,7 @@ public abstract class DataStoreTestBase 
     log.info("test method: testGet3UnionField") ;
     DataStoreTestUtil.testGetEmployee3UnionField(employeeStore) ;
   }
-  
+
   @Test
   public void testGetWithFields() throws IOException, Exception {
     log.info("test method: testGetWithFields");

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java Sat Jul 20 23:06:51 2013
@@ -36,7 +36,11 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import junit.framework.Assert;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNull;
 
 import org.apache.avro.generic.GenericArray;
 import org.apache.avro.util.Utf8;
@@ -44,15 +48,14 @@ import org.apache.gora.examples.WebPageD
 import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.examples.generated.Metadata;
 import org.apache.gora.examples.generated.WebPage;
-import org.apache.gora.persistency.BeanFactory;
 import org.apache.gora.persistency.Persistent;
 import org.apache.gora.persistency.impl.BeanFactoryImpl;
 import org.apache.gora.query.PartitionQuery;
 import org.apache.gora.query.Query;
 import org.apache.gora.query.Result;
-import org.apache.gora.store.DataStore;
 import org.apache.gora.util.ByteUtils;
 import org.apache.gora.util.StringUtils;
+import org.junit.Test;
 
 /**
  * Test utilities for DataStores. This utility class provides everything
@@ -76,11 +79,11 @@ public class DataStoreTestUtil {
     T obj1 = dataStore.newPersistent();
     T obj2 = dataStore.newPersistent();
 
-    Assert.assertEquals(dataStore.getPersistentClass(),
+    assertEquals(dataStore.getPersistentClass(),
         obj1.getClass());
-    Assert.assertNotNull(obj1);
-    Assert.assertNotNull(obj2);
-    Assert.assertFalse( obj1 == obj2 );
+    assertNotNull(obj1);
+    assertNotNull(obj2);
+    assertFalse( obj1 == obj2 );
   }
 
   public static <K> Employee createEmployee(
@@ -142,10 +145,10 @@ public class DataStoreTestUtil {
       DataStore<K, T> dataStore) throws IOException, Exception {
     dataStore.createSchema();
 
-    Assert.assertTrue(dataStore.schemaExists());
+    assertTrue(dataStore.schemaExists());
 
     dataStore.deleteSchema();
-    Assert.assertFalse(dataStore.schemaExists());
+    assertFalse(dataStore.schemaExists());
   }
 
   public static void testGetEmployee(DataStore<String, Employee> dataStore)
@@ -158,7 +161,7 @@ public class DataStoreTestUtil {
 
     Employee after = dataStore.get(ssn, Employee._ALL_FIELDS);
 
-    Assert.assertEquals(employee, after);
+    assertEquals(employee, after);
   }
 
 
@@ -173,8 +176,8 @@ public class DataStoreTestUtil {
     dataStore.put(ssn, employee);
     dataStore.flush();
     Employee after = dataStore.get(ssn, Employee._ALL_FIELDS);
-    Assert.assertEquals(employee, after);
-    Assert.assertEquals(boss, after.getBoss()) ;
+    assertEquals(employee, after);
+    assertEquals(boss, after.getBoss()) ;
   }
 
   public static void testGetEmployeeDoubleRecursive(DataStore<String, Employee> dataStore)
@@ -191,9 +194,9 @@ public class DataStoreTestUtil {
       dataStore.put(ssn, employee);
       dataStore.flush();
       Employee after = dataStore.get(ssn, Employee._ALL_FIELDS);
-      Assert.assertEquals(employee, after);
-      Assert.assertEquals(boss, after.getBoss()) ;
-      Assert.assertEquals(uberBoss, ((Employee)after.getBoss()).getBoss()) ;
+      assertEquals(employee, after);
+      assertEquals(boss, after.getBoss()) ;
+      assertEquals(uberBoss, ((Employee)after.getBoss()).getBoss()) ;
     }
   
   public static void testGetEmployeeNested(DataStore<String, Employee> dataStore)
@@ -213,8 +216,8 @@ public class DataStoreTestUtil {
     dataStore.put(ssn, employee);
     dataStore.flush();
     Employee after = dataStore.get(ssn, Employee._ALL_FIELDS);
-    Assert.assertEquals(employee, after);
-    Assert.assertEquals(webpage, after.getWebpage()) ;
+    assertEquals(employee, after);
+    assertEquals(webpage, after.getWebpage()) ;
   }
   
   public static void testGetEmployee3UnionField(DataStore<String, Employee> dataStore)
@@ -227,14 +230,14 @@ public class DataStoreTestUtil {
     dataStore.put(ssn, employee);
     dataStore.flush();
     Employee after = dataStore.get(ssn, Employee._ALL_FIELDS);
-    Assert.assertEquals(employee, after);
-    Assert.assertEquals("Real boss", ((Utf8)after.getBoss()).toString()) ;
+    assertEquals(employee, after);
+    assertEquals("Real boss", ((Utf8)after.getBoss()).toString()) ;
   }
   
   public static void testGetEmployeeNonExisting(DataStore<String, Employee> dataStore)
     throws IOException, Exception {
     Employee employee = dataStore.get("_NON_EXISTING_SSN_FOR_EMPLOYEE_");
-    Assert.assertNull(employee);
+    assertNull(employee);
   }
 
   public static void testGetEmployeeWithFields(DataStore<String, Employee> dataStore)
@@ -262,7 +265,7 @@ public class DataStoreTestUtil {
         expected.put(index, employee.get(index));
       }
 
-      Assert.assertEquals(expected, after);        
+      assertEquals(expected, after);        
     }
   }
 
@@ -300,7 +303,7 @@ public class DataStoreTestUtil {
     dataStore.flush();
 
     employee = dataStore.get(Long.toString(ssn + 1));
-    Assert.assertNull(employee);
+    assertNull(employee);
   }
 
   public static void testUpdateEmployee(DataStore<String, Employee> dataStore)
@@ -334,9 +337,9 @@ public class DataStoreTestUtil {
     for (int i = 0; i < 1; i++) {
       String key = Long.toString(ssn + i);
       Employee employee = dataStore.get(key);
-      Assert.assertEquals(now - 18L * YEAR_IN_MS, employee.getDateOfBirth());
-      Assert.assertEquals("John Doe " + (i + 5), employee.getName().toString());
-      Assert.assertEquals(120000, employee.getSalary());
+      assertEquals(now - 18L * YEAR_IN_MS, employee.getDateOfBirth());
+      assertEquals("John Doe " + (i + 5), employee.getName().toString());
+      assertEquals(120000, employee.getSalary());
     }
   }
 
@@ -384,21 +387,21 @@ public class DataStoreTestUtil {
 
     for (int i = 0; i < urls.length; i++) {
       WebPage webPage = dataStore.get(urls[i]);
-      Assert.assertEquals(content + i, ByteUtils.toString( toByteArray(webPage.getContent()) ));
-      Assert.assertEquals(10, webPage.getParsedContent().size());
+      assertEquals(content + i, ByteUtils.toString( toByteArray(webPage.getContent()) ));
+      assertEquals(10, webPage.getParsedContent().size());
       int j = 0;
       for (Utf8 pc : webPage.getParsedContent()) {
-        Assert.assertEquals(parsedContent + i + "," + j, pc.toString());
+        assertEquals(parsedContent + i + "," + j, pc.toString());
         j++;
       }
       int count = 0;
       for (j = 1; j < urls.length; j += 2) {
         Utf8 link = webPage.getOutlinks().get(new Utf8(anchor + j));
-        Assert.assertNotNull(link);
-        Assert.assertEquals(urls[j], link.toString());
+        assertNotNull(link);
+        assertEquals(urls[j], link.toString());
         count++;
       }
-      Assert.assertEquals(count, webPage.getOutlinks().size());
+      assertEquals(count, webPage.getOutlinks().size());
     }
 
     for (int i = 0; i < urls.length; i++) {
@@ -416,49 +419,49 @@ public class DataStoreTestUtil {
       int count = 0;
       for (int j = 0; j < urls.length; j++) {
         Utf8 link = webPage.getOutlinks().get(new Utf8(anchor + j));
-        Assert.assertNotNull(link);
-        Assert.assertEquals(urls[j], link.toString());
+        assertNotNull(link);
+        assertEquals(urls[j], link.toString());
         count++;
       }
     }
   }
 
   public static void assertWebPage(WebPage page, int i) throws Exception{
-    Assert.assertNotNull(page);
+    assertNotNull(page);
 
-    Assert.assertEquals(URLS[i], page.getUrl().toString());
+    assertEquals(URLS[i], page.getUrl().toString());
     // 'content' is optional
     if (page.getContent() != null) {
-      Assert.assertTrue("content error:" + new String( toByteArray(page.getContent()) ) +
+      assertTrue("content error:" + new String( toByteArray(page.getContent()) ) +
         " actual=" + CONTENTS[i] + " i=" + i
         , Arrays.equals( toByteArray(page.getContent() )
         , CONTENTS[i].getBytes()));
       GenericArray<Utf8> parsedContent = page.getParsedContent();
-      Assert.assertNotNull(parsedContent);
-      Assert.assertTrue(parsedContent.size() > 0);
+      assertNotNull(parsedContent);
+      assertTrue(parsedContent.size() > 0);
     
       int j=0;
       String[] tokens = CONTENTS[i].split(" ");
       for(Utf8 token : parsedContent) {
-        Assert.assertEquals(tokens[j++], token.toString());
+        assertEquals(tokens[j++], token.toString());
       }
     } else {
       // when page.getContent() is null
-      Assert.assertTrue(CONTENTS[i] == null) ;
+      assertTrue(CONTENTS[i] == null) ;
       GenericArray<Utf8> parsedContent = page.getParsedContent();
-      Assert.assertNotNull(parsedContent);
-      Assert.assertTrue(parsedContent.size() == 0);
+      assertNotNull(parsedContent);
+      assertTrue(parsedContent.size() == 0);
     }
 
     if(LINKS[i].length > 0) {
-      Assert.assertNotNull(page.getOutlinks());
-      Assert.assertTrue(page.getOutlinks().size() > 0);
+      assertNotNull(page.getOutlinks());
+      assertTrue(page.getOutlinks().size() > 0);
       for(int k=0; k<LINKS[i].length; k++) {
-        Assert.assertEquals(ANCHORS[i][k],
+        assertEquals(ANCHORS[i][k],
           page.getFromOutlinks(new Utf8(URLS[LINKS[i][k]])).toString());
       }
     } else {
-      Assert.assertTrue(page.getOutlinks() == null || page.getOutlinks().isEmpty());
+      assertTrue(page.getOutlinks() == null || page.getOutlinks().isEmpty());
     }
   }
 
@@ -491,10 +494,10 @@ public class DataStoreTestUtil {
       query.setFields(fields);
       query.setKey(URLS[i]);
       Result<String, WebPage> result = query.execute();
-      Assert.assertTrue(result.next());
+      assertTrue(result.next());
       WebPage page = result.get();
       assertWebPage(page, i);
-      Assert.assertFalse(result.next());
+      assertFalse(result.next());
     }
   }
 
@@ -539,7 +542,7 @@ public class DataStoreTestUtil {
 
         int expectedLength = (setEndKeys ? j+1: sortedUrls.size()) -
                              (setStartKeys ? i: 0);
-        Assert.assertEquals(expectedLength, r);
+        assertEquals(expectedLength, r);
         if(!setEndKeys)
           break;
       }
@@ -597,7 +600,7 @@ public class DataStoreTestUtil {
       actualNumResults++;
     }
     result.close();
-    Assert.assertEquals(numResults, actualNumResults);
+    assertEquals(numResults, actualNumResults);
   }
 
   public static void testGetPartitions(DataStore<String, WebPage> store)
@@ -610,11 +613,11 @@ public class DataStoreTestUtil {
       , Query<String, WebPage> query) throws IOException, Exception {
     List<PartitionQuery<String, WebPage>> partitions = store.getPartitions(query);
 
-    Assert.assertNotNull(partitions);
-    Assert.assertTrue(partitions.size() > 0);
+    assertNotNull(partitions);
+    assertTrue(partitions.size() > 0);
 
     for(PartitionQuery<String, WebPage> partition:partitions) {
-      Assert.assertNotNull(partition);
+      assertNotNull(partition);
     }
 
     assertPartitions(store, query, partitions);
@@ -630,43 +633,43 @@ public class DataStoreTestUtil {
 
     //execute query and count results
     Result<String, WebPage> result = store.execute(query);
-    Assert.assertNotNull(result);
+    assertNotNull(result);
 
     while(result.next()) {
-      Assert.assertNotNull(result.getKey());
-      Assert.assertNotNull(result.get());
+      assertNotNull(result.getKey());
+      assertNotNull(result.get());
       results.put(result.getKey(), result.get().hashCode()); //keys are not reused, so this is safe
       count++;
     }
     result.close();
 
-    Assert.assertTrue(count > 0); //assert that results is not empty
-    Assert.assertEquals(count, results.size()); //assert that keys are unique
+    assertTrue(count > 0); //assert that results is not empty
+    assertEquals(count, results.size()); //assert that keys are unique
 
     for(PartitionQuery<String, WebPage> partition:partitions) {
-      Assert.assertNotNull(partition);
+      assertNotNull(partition);
 
       result = store.execute(partition);
-      Assert.assertNotNull(result);
+      assertNotNull(result);
 
       while(result.next()) {
-        Assert.assertNotNull(result.getKey());
-        Assert.assertNotNull(result.get());
+        assertNotNull(result.getKey());
+        assertNotNull(result.get());
         partitionResults.put(result.getKey(), result.get().hashCode());
         partitionsCount++;
       }
       result.close();
 
-      Assert.assertEquals(partitionsCount, partitionResults.size()); //assert that keys are unique
+      assertEquals(partitionsCount, partitionResults.size()); //assert that keys are unique
     }
 
-    Assert.assertTrue(partitionsCount > 0);
-    Assert.assertEquals(count, partitionsCount);
+    assertTrue(partitionsCount > 0);
+    assertEquals(count, partitionsCount);
 
     for(Map.Entry<String, Integer> r : results.entrySet()) {
       Integer p = partitionResults.get(r.getKey());
-      Assert.assertNotNull(p);
-      Assert.assertEquals(r.getValue(), p);
+      assertNotNull(p);
+      assertEquals(r.getValue(), p);
     }
   }
 
@@ -676,11 +679,11 @@ public class DataStoreTestUtil {
 
     int deletedSoFar = 0;
     for(String url : URLS) {
-      Assert.assertTrue(store.delete(url));
+      assertTrue(store.delete(url));
       store.flush();
 
       //assert that it is actually deleted
-      Assert.assertNull(store.get(url));
+      assertNull(store.get(url));
 
       //assert that other records are not deleted
       assertNumResults(store.newQuery(), URLS.length - ++deletedSoFar);
@@ -765,17 +768,17 @@ public class DataStoreTestUtil {
     //assert that data is deleted
     for (int i = 0; i < SORTED_URLS.length; i++) {
       WebPage page = store.get(SORTED_URLS[i]);
-      Assert.assertNotNull(page);
+      assertNotNull(page);
 
-      Assert.assertNotNull(page.getUrl());
-      Assert.assertEquals(page.getUrl().toString(), SORTED_URLS[i]);
-      Assert.assertEquals(0, page.getOutlinks().size());
-      Assert.assertEquals(0, page.getParsedContent().size());
+      assertNotNull(page.getUrl());
+      assertEquals(page.getUrl().toString(), SORTED_URLS[i]);
+      assertEquals(0, page.getOutlinks().size());
+      assertEquals(0, page.getParsedContent().size());
       if(page.getContent() != null) {
         System.out.println("url:" + page.getUrl().toString());
         System.out.println( "limit:" + page.getContent().limit());
       } else {
-        Assert.assertNull(page.getContent());
+        assertNull(page.getContent());
       }
     }
 
@@ -801,18 +804,18 @@ public class DataStoreTestUtil {
     //assert that data is deleted
     for (int i = 0; i < URLS.length; i++) {
       WebPage page = store.get(URLS[i]);
-      Assert.assertNotNull(page);
+      assertNotNull(page);
       if( URLS[i].compareTo(startKey) < 0 || URLS[i].compareTo(endKey) >= 0) {
         //not deleted
         assertWebPage(page, i);
       } else {
         //deleted
-        Assert.assertNull(page.getUrl());
-        Assert.assertNotNull(page.getOutlinks());
-        Assert.assertNotNull(page.getParsedContent());
-        Assert.assertNotNull(page.getContent());
-        Assert.assertTrue(page.getOutlinks().size() > 0);
-        Assert.assertTrue(page.getParsedContent().size() > 0);
+        assertNull(page.getUrl());
+        assertNotNull(page.getOutlinks());
+        assertNotNull(page.getParsedContent());
+        assertNotNull(page.getContent());
+        assertTrue(page.getOutlinks().size() > 0);
+        assertTrue(page.getParsedContent().size() > 0);
       }
     }
 

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/store/TestDataStoreFactory.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/store/TestDataStoreFactory.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/store/TestDataStoreFactory.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/store/TestDataStoreFactory.java Sat Jul 20 23:06:51 2013
@@ -20,7 +20,9 @@ package org.apache.gora.store;
 
 import java.util.Properties;
 
-import junit.framework.Assert;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotSame;
 
 import org.apache.gora.avro.store.DataFileAvroStore;
 import org.apache.gora.mock.persistency.MockPersistent;
@@ -42,23 +44,23 @@ public class TestDataStoreFactory {
   public void testGetDataStore() throws GoraException {
     DataStore<?,?> dataStore = DataStoreFactory.getDataStore("org.apache.gora.mock.store.MockDataStore"
         , String.class, MockPersistent.class, conf);
-    Assert.assertNotNull(dataStore);
+    assertNotNull(dataStore);
   }
   
   @Test
   public void testGetClasses() throws GoraException {
     DataStore<?,?> dataStore = DataStoreFactory.getDataStore("org.apache.gora.mock.store.MockDataStore"
         , String.class, MockPersistent.class, conf);
-    Assert.assertNotNull(dataStore);
-    Assert.assertEquals(String.class, dataStore.getKeyClass());
-    Assert.assertEquals(MockPersistent.class, dataStore.getPersistentClass());
+    assertNotNull(dataStore);
+    assertEquals(String.class, dataStore.getKeyClass());
+    assertEquals(MockPersistent.class, dataStore.getPersistentClass());
   }
   
   @Test
   public void testGetDataStore2() throws GoraException {
     DataStore<?,?> dataStore = DataStoreFactory.getDataStore(MockDataStore.class
         , String.class, MockPersistent.class, conf);
-    Assert.assertNotNull(dataStore);
+    assertNotNull(dataStore);
   }
   
   @Test
@@ -70,8 +72,8 @@ public class TestDataStoreFactory {
     DataStore<?,?> dataStore3 = DataStoreFactory.getDataStore("org.apache.gora.mock.store.MockDataStore"
         , String.class, MockPersistent.class, conf);
     
-    Assert.assertNotSame(dataStore1, dataStore2);
-    Assert.assertNotSame(dataStore1, dataStore3);
+    assertNotSame(dataStore1, dataStore2);
+    assertNotSame(dataStore1, dataStore3);
   }
   
   @Test
@@ -79,8 +81,8 @@ public class TestDataStoreFactory {
     //indirect testing
     DataStore<?,?> dataStore = DataStoreFactory.getDataStore(String.class,
             MockPersistent.class, conf);
-    Assert.assertNotNull(dataStore);
-    Assert.assertEquals(MockDataStore.class, dataStore.getClass());
+    assertNotNull(dataStore);
+    assertEquals(MockDataStore.class, dataStore.getClass());
   }
   
   @Test
@@ -91,15 +93,15 @@ public class TestDataStoreFactory {
     
     String fooValue = DataStoreFactory.findProperty(properties, store
         , "foo_property", "foo_default");
-    Assert.assertEquals("foo_value", fooValue);
+    assertEquals("foo_value", fooValue);
     
     String bazValue = DataStoreFactory.findProperty(properties, store
         , "baz_property", "baz_default");
-    Assert.assertEquals("baz_value", bazValue);
+    assertEquals("baz_value", bazValue);
     
     String barValue = DataStoreFactory.findProperty(properties, store
         , "bar_property", "bar_default");
-    Assert.assertEquals("bar_value", barValue);
+    assertEquals("bar_value", barValue);
   }
   
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java Sat Jul 20 23:06:51 2013
@@ -20,18 +20,18 @@ package org.apache.gora.store;
 
 import java.io.IOException;
 
-import junit.framework.Assert;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.Ignore;
+import static org.junit.Assert.assertTrue;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.gora.GoraTestDriver;
 import org.apache.gora.persistency.Persistent;
-import org.apache.gora.store.DataStore;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
 
 /**
  * A base class for {@link DataStore} tests. This is just a convenience
@@ -148,14 +148,15 @@ public abstract class WSDataStoreTestBas
     log.info("test method: testDeleteSchema");
     assertDeleteSchema();
   }
-  
+
+
   public void assertDeleteSchema(){
   }
 
   @Test
   public void testSchemaExists() throws Exception {
     log.info("test method: testSchemaExists");
-    Assert.assertTrue(dataStore.schemaExists());
+    assertTrue(dataStore.schemaExists());
   }
 
   @Test
@@ -164,6 +165,7 @@ public abstract class WSDataStoreTestBas
     assertPut();
   }
 
+
   public void assertPut() throws IOException {
   }
 
@@ -179,6 +181,7 @@ public abstract class WSDataStoreTestBas
     assertPutArray();
   }
 
+
   public void assertPutArray() throws IOException {
   }
 
@@ -190,6 +193,7 @@ public abstract class WSDataStoreTestBas
     assertPutBytes(contentBytes);
   }
 
+  @Ignore
   public void assertPutBytes(byte[] contentBytes) throws IOException {
   }
 
@@ -199,6 +203,7 @@ public abstract class WSDataStoreTestBas
     assertPutMap();
   }
 
+  @Ignore
   public void assertPutMap() throws IOException {
   }
 
@@ -208,9 +213,11 @@ public abstract class WSDataStoreTestBas
     assertTestUpdateDataStore();
   }
 
+  @Ignore
   public void assertTestUpdateDataStore(){
   }
-  
+
+  @Ignore
   @Test
   public void testEmptyUpdate() throws IOException, Exception {
   }
@@ -220,7 +227,8 @@ public abstract class WSDataStoreTestBas
     log.info("test method: testGet");
     assertTestGetDataStore();
   }
-  
+
+  @Ignore
   public void assertTestGetDataStore() throws IOException {
   }
   
@@ -234,7 +242,8 @@ public abstract class WSDataStoreTestBas
     log.info("test method: testQuery");
     assertTestQueryDataStore();
   }
- 
+
+  @Ignore
   public void assertTestQueryDataStore() throws IOException {
   }
 
@@ -254,6 +263,7 @@ public abstract class WSDataStoreTestBas
     assertTestQueryKeyRange();
   }
 
+  @Ignore
   public void assertTestQueryKeyRange(){}
   
   @Test
@@ -261,6 +271,8 @@ public abstract class WSDataStoreTestBas
     log.info("test method: testDelete");
     assertTestDeleteDataStore();
   }
+
+  @Ignore
   public void assertTestDeleteDataStore(){}
   
   @Test
@@ -268,6 +280,8 @@ public abstract class WSDataStoreTestBas
     log.info("test method: testDeleteByQuery");
     assertTestDeleteByQueryDataStore();
   }
+
+  @Ignore
   public void assertTestDeleteByQueryDataStore(){
   }
   

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestIOUtils.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestIOUtils.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestIOUtils.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestIOUtils.java Sat Jul 20 23:06:51 2013
@@ -27,20 +27,18 @@ import java.io.EOFException;
 import java.io.IOException;
 import java.util.Arrays;
 
-import junit.framework.Assert;
-
 import org.apache.avro.ipc.ByteBufferInputStream;
 import org.apache.avro.ipc.ByteBufferOutputStream;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.gora.mapreduce.GoraMapReduceUtils;
-import org.apache.gora.util.IOUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.DataOutputBuffer;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Test case for {@link IOUtils} class.
@@ -122,13 +120,13 @@ public class TestIOUtils {
         log.info("Before: " + before);
         log.info("After : " + after);
         
-        Assert.assertEquals(before, after);
+        assertEquals(before, after);
       }
       
       //assert that the end of input is reached
       try {
         long skipped = dis.skip(1);
-        Assert.assertEquals(0, skipped);
+        assertEquals(0, skipped);
       }catch (EOFException expected) {
         //either should throw exception or return 0 as skipped
       }
@@ -204,10 +202,10 @@ public class TestIOUtils {
     boolean[] ret = IOUtils.readNullFieldsInfo(in);
 
     //assert
-    Assert.assertEquals(values.length, ret.length);
+    assertEquals(values.length, ret.length);
 
     for(int i=0; i<values.length; i++) {
-      Assert.assertEquals( values[i] == null , ret[i]);
+      assertEquals( values[i] == null , ret[i]);
     }
   }
   
@@ -238,9 +236,9 @@ public class TestIOUtils {
   }
   
   public void assertByteArrayEquals(byte[] expected, byte[] actual) {
-    Assert.assertEquals("Array lengths do not match", expected.length, actual.length);
+    assertEquals("Array lengths do not match", expected.length, actual.length);
     for(int j=0; j<expected.length; j++) {
-      Assert.assertEquals("bytes at position "+j+" do not match", expected[j], actual[j]);
+      assertEquals("bytes at position "+j+" do not match", expected[j], actual[j]);
     }
   }
 }

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestWritableUtils.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestWritableUtils.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestWritableUtils.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/util/TestWritableUtils.java Sat Jul 20 23:06:51 2013
@@ -26,7 +26,7 @@ import java.io.DataOutput;
 import java.io.DataOutputStream;
 import java.util.Properties;
 
-import org.junit.Assert;
+import static org.junit.Assert.assertEquals;
 import org.junit.Test;
 
 /**
@@ -47,7 +47,7 @@ public class TestWritableUtils {
     
     Properties propsRead = WritableUtils.readProperties(in);
     
-    Assert.assertEquals(propsRead.get("keyBlah"), props.get("keyBlah"));
-    Assert.assertEquals(propsRead.get("keyBlah2"), props.get("keyBlah2"));
+    assertEquals(propsRead.get("keyBlah"), props.get("keyBlah"));
+    assertEquals(propsRead.get("keyBlah2"), props.get("keyBlah2"));
   }
 }

Modified: gora/trunk/gora-dynamodb/src/test/java/org/apache/gora/dynamodb/TestDynamoDBStore.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-dynamodb/src/test/java/org/apache/gora/dynamodb/TestDynamoDBStore.java?rev=1505236&r1=1505235&r2=1505236&view=diff
==============================================================================
--- gora/trunk/gora-dynamodb/src/test/java/org/apache/gora/dynamodb/TestDynamoDBStore.java (original)
+++ gora/trunk/gora-dynamodb/src/test/java/org/apache/gora/dynamodb/TestDynamoDBStore.java Sat Jul 20 23:06:51 2013
@@ -21,7 +21,8 @@ package org.apache.gora.dynamodb;
 import java.io.IOException;
 import java.util.HashSet;
 
-import junit.framework.Assert;
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.assertFalse;
 
 import org.apache.gora.dynamodb.query.DynamoDBKey;
 import org.apache.gora.dynamodb.query.DynamoDBQuery;
@@ -30,10 +31,7 @@ import org.apache.gora.query.Query;
 import org.apache.gora.query.Result;
 import org.apache.gora.store.DataStore;
 import org.apache.gora.store.WSDataStoreTestBase;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.*;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,74 +48,87 @@ public class TestDynamoDBStore extends W
   static {
     setTestDriver(new GoraDynamoDBTestDriver());
   }
-  
+
   @Before
   public void setUp() throws Exception {
     setPersistentKeyClass(DynamoDBKey.class);
     setPersistentValClass(person.class);
     super.setUp();
   }
-  
+
   public GoraDynamoDBTestDriver getTestDriver() {
     return (GoraDynamoDBTestDriver) testDriver;
   }
-  
+
 //============================================================================
-  //We need to skip the following tests for a while until we fix some issues..
+    //We need to skip the following tests for a while until we fix some issues..
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testQueryStartKey() throws IOException {
     log.info("test method: TestQueryStartKey SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testQueryEndKey() throws IOException {
     log.info("test method: TestQueryEndKey SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testDeleteByQueryFields() throws IOException {
     log.info("test method: TestDeleteByQueryFields SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testNewInstance() throws IOException, Exception {
     log.info("test method: TestNewInstance SKIPPED.");
-  } 
+  }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testAutoCreateSchema() throws Exception {
     log.info("test method: TestAutoCreateSchema SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testTruncateSchema() throws Exception {
     log.info("test method: TestTruncateSchema SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testPutNested() throws IOException, Exception {
     log.info("test method: TestPutNested SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testPutArray() throws IOException, Exception {
     log.info("test method: TestPutArray SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testPutBytes() throws IOException, Exception {
-    log.info("test method: TestPutBytes SKIPPED."); 
+    log.info("test method: TestPutBytes SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testPutMap() throws IOException, Exception {
     log.info("test method: TestPutMap SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testEmptyUpdate() throws IOException, Exception {
-    log.info("test method: TestEmptyUpdate SKIPPED."); 
+    log.info("test method: TestEmptyUpdate SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testDeleteSchema() throws IOException, Exception {
     log.info("test method: TestDeleteSchema SKIPPED.");
   }
+  @Ignore("Needs to be skipped for a while until some issues are fixed")
   @Override
   public void testGetWithFields() throws IOException, Exception {
-    log.info("test method: TestGetWithFields SKIPPED."); 
+    log.info("test method: TestGetWithFields SKIPPED.");
   }
-//============================================================================
-  
+//==========================================================================
+
   /**
    * Tests deleting items using a query
    */
@@ -143,7 +154,7 @@ public class TestDynamoDBStore extends W
       e.printStackTrace();
     }
   }
-  
+
   /**
    * Tests updating a specific item
    */
@@ -163,28 +174,28 @@ public class TestDynamoDBStore extends W
       e.printStackTrace();
     }
   }
-  
+
   /**
    * Method to test deleting a schema
-   
+   */
   @Override
   public void assertDeleteSchema(){
     try {
       log.info("test method: TestDeleteSchema using DynamoDB store.");
-    dataStore.deleteSchema();
+      dataStore.deleteSchema();
     } catch (Exception e) {
       log.error("error in test method: testDeleteSchema.");
       e.printStackTrace();
     }
   }
-*/
+ 
   /**
    * Method to verify if a schema exists or not
    */
   @Override
   public void assertSchemaExists(String schemaName) throws Exception {
     log.info("test method: TestSchemaExists using DynamoDB store.");
-    Assert.assertTrue(dataStore.schemaExists());
+    assertTrue(dataStore.schemaExists());
   }
 
   /**
@@ -204,10 +215,10 @@ public class TestDynamoDBStore extends W
       dataStore.put(dKey, p2);
     } catch (Exception e) {
       log.error("error in test method: testPut.");
-    e.printStackTrace();
+      e.printStackTrace();
     }
   }
-  
+
   /**
    * Method to query the data store
    */
@@ -223,18 +234,18 @@ public class TestDynamoDBStore extends W
       query.setKey(dKey);
       Result<DynamoDBKey, person> queryResult = dataStore.execute(query);
       processQueryResult(queryResult);
-  } catch (Exception e) {
-    log.error("error in test method: testQuery.");
+    } catch (Exception e) {
+      log.error("error in test method: testQuery.");
       e.printStackTrace();
     }
   }
-  
+
   /**
    * Method to query items into the data store
    */
   @Override
   public void assertTestQueryKeyRange(){
-    log.info("test method: testQueryKeyRange using specific data store.");  
+    log.info("test method: testQueryKeyRange using specific data store.");
     try {
       DynamoDBKey<String, String> dKey = new DynamoDBKey<String, String>();
       DynamoDBKey<String, String> startKey = new DynamoDBKey<String, String>();
@@ -255,7 +266,7 @@ public class TestDynamoDBStore extends W
       e.printStackTrace();
     }
   }
-  
+
   /**
    * Method to get an specific object using a key
    */
@@ -277,7 +288,7 @@ public class TestDynamoDBStore extends W
       e.printStackTrace();
     }
   }
-  
+
   /**
    * Method to delete items into the data store
    */
@@ -294,21 +305,21 @@ public class TestDynamoDBStore extends W
       p1.setFirstName("Joao");
       p1.setLastName("Velasco");
       dataStore.put(dKey, p1);
-      Assert.assertTrue(dataStore.delete(dKey));
+      assertTrue(dataStore.delete(dKey));
       dKey.setRangeKey("10/10/1000");
-      Assert.assertFalse(dataStore.delete(dKey));
+      assertFalse(dataStore.delete(dKey));
     }catch (Exception e) {
       log.error("error in test method: testDeleteDataStore.");
       e.printStackTrace();
+    }
   }
-  }
-  
+
   /**
    * Method to create the data store
    */
   @Override
   protected DataStore<DynamoDBKey, person> createDataStore() {
-   log.info("Creating DynamoDB data store.");
+    log.info("Creating DynamoDB data store.");
     try {
       dataStore = getTestDriver().getDataStore();
       dataStore.createSchema();
@@ -316,9 +327,9 @@ public class TestDynamoDBStore extends W
       log.error("error while creating DynamoDB data store");
       e.printStackTrace();
     }
-    return dataStore;
-  } 
-  
+      return dataStore;
+  }
+
   /**
    * Processes query results from an query execution
    * @param pQueryResult
@@ -328,15 +339,15 @@ public class TestDynamoDBStore extends W
       log.debug("Processing tests results.");
       while(pQueryResult.next())
         printPersonInfo(pQueryResult.get());
-    } catch (IOException e) {
-      log.error("error while processing tests results.");
-      e.printStackTrace();
-    } catch (Exception e) {
-      log.error("error while processing tests results.");
-      e.printStackTrace();
+      } catch (IOException e) {
+        log.error("error while processing tests results.");
+        e.printStackTrace();
+      } catch (Exception e) {
+        log.error("error while processing tests results.");
+        e.printStackTrace();
+      }
     }
-  }
-  
+
   /**
    * Method to generate persisten objects
    * @param key
@@ -354,24 +365,24 @@ public class TestDynamoDBStore extends W
     newPerson.setLastName(pLastName);
     newPerson.setVisitedplaces(new HashSet<String>());
     for(String place : places)
-  	  newPerson.getVisitedplaces().add(place);
-    return newPerson;
-  }
-  
+      newPerson.getVisitedplaces().add(place);
+      return newPerson;
+    }
+
   /**
    * Method to print the object returned from Get method
    * @param pPerson
    */
   private void printPersonInfo(person pPerson){
-    System.out.println(	"Origin:\t" + pPerson.getHashKey() +
-    "\n Birthday:\t" + pPerson.getRangeKey() +
-    "\n FirstName:" + pPerson.getFirstName() +
-    "\n LastName:" + pPerson.getLastName() + 
-    "\n Visited Places:");
+    log.info("Origin:\t" + pPerson.getHashKey() +
+      "\n Birthday:\t" + pPerson.getRangeKey() +
+      "\n FirstName:" + pPerson.getFirstName() +
+      "\n LastName:" + pPerson.getLastName() +
+      "\n Visited Places:");
     for(String place : pPerson.getVisitedplaces())
-      System.out.println("\t" + place);
+      log.info("\t" + place);
   }
-  
+
   public static void main(String[] args) throws Exception {
     TestDynamoDBStore test = new TestDynamoDBStore();
     try{



Mime
View raw message