usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [5/8] git commit: Restore Concurrent annotation, fix test failures.
Date Wed, 16 Jul 2014 13:54:43 GMT
Restore Concurrent annotation, fix test failures.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/2b033576
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/2b033576
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/2b033576

Branch: refs/heads/two-dot-o
Commit: 2b033576989e2d52d5211240f7432ff85819bbd3
Parents: 0ef3be0
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Thu Jul 10 12:08:15 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Thu Jul 10 12:08:15 2014 -0400

----------------------------------------------------------------------
 .../query/ir/result/ConnectionIndexSliceParser.java   |  2 +-
 .../org/apache/usergrid/persistence/CollectionIT.java |  3 ++-
 .../apache/usergrid/persistence/EntityManagerIT.java  |  3 ++-
 .../java/org/apache/usergrid/persistence/GeoIT.java   | 14 +++++++-------
 .../org/apache/usergrid/persistence/PathQueryIT.java  |  4 ++--
 .../persistence/query/MultiOrderByConnectionIT.java   |  2 +-
 .../query/SingleOrderByIntersectionCollectionIT.java  |  2 +-
 .../query/SingleOrderByIntersectionConnectionIT.java  |  2 +-
 8 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
index 33822f5..51f0c9a 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
@@ -48,7 +48,7 @@ public class ConnectionIndexSliceParser implements SliceParser {
     public ScanColumn parse( ByteBuffer buff ) {
         DynamicComposite composite = DynamicComposite.fromByteBuffer( buff.duplicate() );
 
-        String connectedType = ( String ) composite.get( 1 );
+        String connectedType = composite.get( 1 ).toString();
 
 
         //connection type has been defined and it doesn't match, skip it

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
index b2cad72..19d82be 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 import org.apache.usergrid.AbstractCoreIT;
 import org.apache.usergrid.Application;
 import org.apache.usergrid.CoreApplication;
+import org.apache.usergrid.cassandra.Concurrent;
 import org.apache.usergrid.persistence.entities.User;
 import org.apache.usergrid.persistence.exceptions.DuplicateUniquePropertyExistsException;
 import org.apache.usergrid.persistence.index.query.Identifier;
@@ -50,7 +51,7 @@ import static org.junit.Assert.fail;
 
 //@RunWith(JukitoRunner.class)
 //@UseModules({ GuiceModule.class })
-//@Concurrent()
+@Concurrent()
 public class CollectionIT extends AbstractCoreIT {
     private static final Logger LOG = LoggerFactory.getLogger( CollectionIT.class );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
index 01d85f0..cb65a2a 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
@@ -33,6 +33,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.usergrid.AbstractCoreIT;
 import static org.apache.usergrid.AbstractCoreIT.setup;
+import org.apache.usergrid.cassandra.Concurrent;
 import org.apache.usergrid.persistence.entities.Group;
 import org.apache.usergrid.persistence.entities.User;
 import org.apache.usergrid.persistence.index.query.Query.Level;
@@ -44,7 +45,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 
-//@Concurrent()
+@Concurrent()
 public class EntityManagerIT extends AbstractCoreIT {
     private static final Logger LOG = LoggerFactory.getLogger( EntityManagerIT.class );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
index 3c8eeb1..99fef3d 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
@@ -457,20 +457,20 @@ public class GeoIT extends AbstractCoreIT {
 
         int numEntities = 250;
 
-        float minLattitude = 48.32455f;
-        float maxLattitude = 48.46481f;
+        float minLatitude = 48.32455f;
+        float maxLatitude = 48.46481f;
         float minLongitude = 9.89561f;
         float maxLongitude = 10.0471f;
 
-        float lattitudeDelta = ( maxLattitude - minLattitude ) / numEntities;
+        float latitudeDelta = ( maxLatitude - minLatitude ) / numEntities;
 
         float longitudeDelta = ( maxLongitude - minLongitude ) / numEntities;
 
         for ( int i = 0; i < numEntities; i++ ) {
-            float lattitude = minLattitude + lattitudeDelta * i;
+            float latitude = minLatitude + latitudeDelta * i;
             float longitude = minLongitude + longitudeDelta * i;
 
-            Map<String, Float> location = MapUtils.hashMap( "latitude", lattitude ).map(
"longitude", longitude );
+            Map<String, Float> location = MapUtils.hashMap( "latitude", latitude ).map(
"longitude", longitude );
 
             Map<String, Object> data = new HashMap<String, Object>( 2 );
             data.put( "name", String.valueOf( i ) );
@@ -484,7 +484,7 @@ public class GeoIT extends AbstractCoreIT {
         //do a direct geo iterator test.  We need to make sure that we short circuit on the
correct tile.
 
         float latitude = 48.38626f;
-        float longtitude = 9.94175f;
+        float longitude = 9.94175f;
         int distance = 1000;
         int limit = 8;
 
@@ -509,7 +509,7 @@ public class GeoIT extends AbstractCoreIT {
             //now test at the EM level, there should be 0 results.
             Query query = new Query();
 
-            query.addFilter( "location within 1000 of 48.38626, 9.94175" );
+            query.addFilter( "location within 1000 of 48.38626, 9.94175" ); // lat, lon 
             query.setLimit( limit );
 
             Results results = em.searchCollection( em.getApplicationRef(), "stores", query
);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/test/java/org/apache/usergrid/persistence/PathQueryIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/PathQueryIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/PathQueryIT.java
index 6bb5ce3..fb5e679 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/PathQueryIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/PathQueryIT.java
@@ -78,10 +78,10 @@ public class PathQueryIT extends AbstractCoreIT {
         // query the users, ignoring page boundaries
         Results results = em.searchCollection( em.getApplicationRef(), "users", userQuery
);
         PagingResultsIterator pri = new PagingResultsIterator( results );
-        int count = 2;
+        long count = 2;
         while ( pri.hasNext() ) {
             Entity e = ( Entity ) pri.next();
-            assertEquals( count++, (int)e.getProperty( "index" ) );
+            assertEquals( count++, e.getProperty( "index" ) );
         }
         assertEquals( count, expectedUserQuerySize + 2 );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/test/java/org/apache/usergrid/persistence/query/MultiOrderByConnectionIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/MultiOrderByConnectionIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/query/MultiOrderByConnectionIT.java
index 4c1d7a9..3a0c5fd 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/MultiOrderByConnectionIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/MultiOrderByConnectionIT.java
@@ -22,7 +22,7 @@ import org.apache.usergrid.cassandra.Concurrent;
 
 
 /** @author tnine */
-//@Concurrent()
+@Concurrent()
 public class MultiOrderByConnectionIT extends AbstractIteratingQueryIT {
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionCollectionIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionCollectionIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionCollectionIT.java
index b500613..29ff610 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionCollectionIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionCollectionIT.java
@@ -22,7 +22,7 @@ import org.apache.usergrid.cassandra.Concurrent;
 
 
 /** @author tnine */
-//@Concurrent()
+@Concurrent()
 public class SingleOrderByIntersectionCollectionIT extends AbstractIteratingQueryIT {
     @Test
     public void singleOrderByIntersectionCollection() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2b033576/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionConnectionIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionConnectionIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionConnectionIT.java
index db9bed9..ff1b29b 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionConnectionIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/SingleOrderByIntersectionConnectionIT.java
@@ -22,7 +22,7 @@ import org.apache.usergrid.cassandra.Concurrent;
 
 
 /** @author tnine */
-//@Concurrent()
+@Concurrent()
 public class SingleOrderByIntersectionConnectionIT extends AbstractIteratingQueryIT {
     @Test
     public void singleOrderByIntersectionConnection() throws Exception {


Mime
View raw message