gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djkevi...@apache.org
Subject [13/32] gora git commit: Fix base test cases for put and get functionality
Date Thu, 27 Jul 2017 18:45:39 GMT
Fix base test cases for put and get functionality


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

Branch: refs/heads/master
Commit: c72f418ec98b259673c695ed60fa7290708a1d55
Parents: 27b015e
Author: nishadi <ndimeshi@gmail.com>
Authored: Mon Jun 26 18:35:54 2017 +0530
Committer: nishadi <ndimeshi@gmail.com>
Committed: Mon Jun 26 18:35:54 2017 +0530

----------------------------------------------------------------------
 .../gora/aerospike/GoraAerospikeTestDriver.java |   4 +
 .../aerospike/store/TestAerospikeStore.java     | 199 ++-----------------
 2 files changed, 20 insertions(+), 183 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/c72f418e/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java
----------------------------------------------------------------------
diff --git a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java
index 1281d9b..10ef7a1 100644
--- a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java
+++ b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java
@@ -44,6 +44,10 @@ public class GoraAerospikeTestDriver extends GoraTestDriver {
 
   @Override
   public void setUpClass() throws Exception {
+
+    // Wait for the aerospike server to be started in the container
+    Thread.sleep(5000);
+
     properties.setProperty("server.ip", "localhost");
     properties.setProperty("server.port", aerospikeContainer.getMappedPort(3000).toString());
   }

http://git-wip-us.apache.org/repos/asf/gora/blob/c72f418e/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
----------------------------------------------------------------------
diff --git a/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
index e1af3cd..8b63414 100644
--- a/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
+++ b/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
@@ -19,23 +19,18 @@
 package org.apache.gora.aerospike.store;
 
 import org.apache.gora.aerospike.GoraAerospikeTestDriver;
-import org.apache.gora.examples.generated.Employee;
-import org.apache.gora.examples.generated.WebPage;
-import org.apache.gora.store.DataStoreFactory;
 import org.apache.gora.store.DataStoreTestBase;
 import org.junit.ClassRule;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.testcontainers.containers.GenericContainer;
 
-import java.io.IOException;
-
 /**
  * Test case for AerospikeStore.
  */
 public class TestAerospikeStore extends DataStoreTestBase {
 
-  private static final String DOCKER_CONTAINER_NAME = "aerospike:3.14.0";
+  private static final String DOCKER_CONTAINER_NAME = "aerospike/aerospike-server:latest";
 
   @ClassRule
   public static GenericContainer aerospikeContainer = new GenericContainer(DOCKER_CONTAINER_NAME);
@@ -55,246 +50,84 @@ public class TestAerospikeStore extends DataStoreTestBase {
   }
 
   @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testNewInstance() throws Exception {
-    // super.testNewInstance();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testCreateSchema() throws Exception {
-    // super.testCreateSchema();
-  }
-
-  @Override
-  public void assertSchemaExists(String schemaName) throws Exception {
-    super.assertSchemaExists(schemaName);
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testAutoCreateSchema() throws Exception {
-    super.testAutoCreateSchema();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void assertAutoCreateSchema() throws Exception {
-    super.assertAutoCreateSchema();
-  }
-
-  @Test
-  @Ignore("To be implemented")
+  @Ignore("Explicit schema creation related functionality is not supported in Aerospike")
   @Override
   public void testTruncateSchema() throws Exception {
     super.testTruncateSchema();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Explicit schema creation related functionality is not supported in Aerospike")
   @Override
   public void testDeleteSchema() throws Exception {
     super.testDeleteSchema();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Explicit schema creation related functionality is not supported in Aerospike")
   @Override
   public void testSchemaExists() throws Exception {
     super.testSchemaExists();
   }
 
   @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testPut() throws Exception {
-    super.testPut();
-  }
-
-  @Override
-  public void assertPut(Employee employee) throws IOException {
-    super.assertPut(employee);
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testPutNested() throws Exception {
-    super.testPutNested();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testPutArray() throws Exception {
-    super.testPutArray();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void assertPutArray() throws IOException {
-    super.assertPutArray();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testPutBytes() throws Exception {
-    super.testPutBytes();
-  }
-
-  @Override
-  public void assertPutBytes(byte[] contentBytes) throws IOException {
-    super.assertPutBytes(contentBytes);
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testPutMap() throws Exception {
-    super.testPutMap();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void assertPutMap() throws IOException {
-    super.assertPutMap();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testPutMixedMaps() throws Exception {
-    super.testPutMixedMaps();
-  }
-
-  @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testUpdate() throws Exception {
     super.testUpdate();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testEmptyUpdate() throws Exception {
     super.testEmptyUpdate();
   }
 
   @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGet() throws Exception {
-    super.testGet();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGetRecursive() throws Exception {
-    super.testGetRecursive();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGetDoubleRecursive() throws Exception {
-    super.testGetDoubleRecursive();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGetNested() throws Exception {
-    super.testGetNested();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGet3UnionField() throws Exception {
-    super.testGet3UnionField();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGetWithFields() throws Exception {
-    super.testGetWithFields();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGetWebPage() throws Exception {
-    super.testGetWebPage();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGetWebPageDefaultFields() throws Exception {
-    super.testGetWebPageDefaultFields();
-  }
-
-  @Test
-  @Ignore("To be implemented")
-  @Override
-  public void testGetNonExisting() throws Exception {
-    super.testGetNonExisting();
-  }
-
-  @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testQuery() throws Exception {
     super.testQuery();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testQueryStartKey() throws Exception {
     super.testQueryStartKey();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testQueryEndKey() throws Exception {
     super.testQueryEndKey();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testQueryKeyRange() throws Exception {
     super.testQueryKeyRange();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testQueryWebPageSingleKey() throws Exception {
     super.testQueryWebPageSingleKey();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testQueryWebPageSingleKeyDefaultFields() throws Exception {
     super.testQueryWebPageSingleKeyDefaultFields();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testQueryWebPageQueryEmptyResults() throws Exception {
     super.testQueryWebPageQueryEmptyResults();
@@ -308,21 +141,21 @@ public class TestAerospikeStore extends DataStoreTestBase {
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testDeleteByQuery() throws Exception {
     super.testDeleteByQuery();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testDeleteByQueryFields() throws Exception {
     super.testDeleteByQueryFields();
   }
 
   @Test
-  @Ignore("To be implemented")
+  @Ignore("Functionality is to be implemented in the next iteration")
   @Override
   public void testGetPartitions() throws Exception {
     super.testGetPartitions();


Mime
View raw message