gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [48/50] [abbrv] git commit: Small cleanups for TestMongoStore
Date Wed, 04 Jun 2014 16:37:05 GMT
Small cleanups for TestMongoStore


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

Branch: refs/heads/master
Commit: ba1c5a89f6a81a8439b9c91dcc17577ec0b92bc5
Parents: 279faf0
Author: Damien Raude-Morvan <damien@dictanova.com>
Authored: Sat May 24 23:57:32 2014 +0200
Committer: Damien Raude-Morvan <damien@dictanova.com>
Committed: Sat May 24 23:57:32 2014 +0200

----------------------------------------------------------------------
 .../gora/mongodb/store/TestMongoStore.java      | 33 ++++++--------------
 1 file changed, 9 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/ba1c5a89/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
----------------------------------------------------------------------
diff --git a/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
b/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
index 306cc22..a754c2b 100644
--- a/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
+++ b/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
@@ -23,39 +23,33 @@ import org.apache.gora.examples.generated.Employee;
 import org.apache.gora.examples.generated.WebPage;
 import org.apache.gora.mongodb.GoraMongodbTestDriver;
 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.Before;
 import org.junit.Ignore;
 
 public class TestMongoStore extends DataStoreTestBase {
 
-  private Configuration conf;
-
   static {
     setTestDriver(new GoraMongodbTestDriver());
   }
 
-  @Before
-  public void setUp() throws Exception {
-    super.setUp();
-  }
-
-  @SuppressWarnings("unchecked")
+  @Deprecated
   @Override
   protected DataStore<String, Employee> createEmployeeDataStore()
       throws IOException {
-    return DataStoreFactory.getDataStore(MongoStore.class, String.class,
-        Employee.class, conf);
+    throw new UnsupportedOperationException();
   }
 
-  @SuppressWarnings("unchecked")
+  @Deprecated
   @Override
   protected DataStore<String, WebPage> createWebPageDataStore()
       throws IOException {
-    return DataStoreFactory.getDataStore(MongoStore.class, String.class,
-        WebPage.class, conf);
+    throw new UnsupportedOperationException();
+  }
+
+  @Before
+  public void setUp() throws Exception {
+    super.setUp();
   }
 
   public GoraMongodbTestDriver getTestDriver() {
@@ -80,13 +74,4 @@ public class TestMongoStore extends DataStoreTestBase {
     // MongoStore doesn't support 3 types union field yet
   }
 
-  public static void main(String[] args) throws Exception {
-    TestMongoStore test = new TestMongoStore();
-    TestMongoStore.setUpClass();
-    test.setUp();
-
-    test.tearDown();
-    TestMongoStore.tearDownClass();
-  }
-
 }


Mime
View raw message