You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/11/16 15:18:22 UTC
[5/5] usergrid git commit: Unignoring and fixing tests more tests.
Unignoring and fixing tests more tests.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/40cd3798
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/40cd3798
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/40cd3798
Branch: refs/heads/ignores
Commit: 40cd37988b72ceaabe7d265eb7c4e5c6e0dd1e95
Parents: 5c85b75
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Nov 16 09:18:05 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Nov 16 09:18:05 2015 -0500
----------------------------------------------------------------------
.../org/apache/usergrid/persistence/CounterIT.java | 1 -
.../usergrid/persistence/EntityConnectionsIT.java | 10 ++++------
.../org/apache/usergrid/persistence/EntityTest.java | 2 --
.../usergrid/persistence/GeoQueryBooleanTest.java | 1 -
.../graph/GraphManagerShardConsistencyIT.java | 1 -
.../collection/paging/PagingResourceIT.java | 13 +++++--------
6 files changed, 9 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
index 54302ad..e558bad 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
@@ -179,7 +179,6 @@ public class CounterIT extends AbstractCoreIT {
@Test
- @Ignore()
public void testCommunityCounters() throws Exception {
EntityManager em = setup.getEmf().getEntityManager( setup.getEmf().getManagementAppId() );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
index 47b61e9..f5d3ce4 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
@@ -341,7 +341,6 @@ public class EntityConnectionsIT extends AbstractCoreIT {
@Test
- @Ignore("This is broken, and needs fixed after the refactor")
public void testConnectionsIterable() throws Exception {
EntityManager em = app.getEntityManager();
assertNotNull( em );
@@ -356,7 +355,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
final int connectionCount = 100;
- final List<Entity> things = new ArrayList<>( connectionCount );
+ final Map<UUID, Entity> things = new HashMap<>();
for(int i = 0; i < connectionCount; i ++){
Map<String, Object> data = new HashMap<String, Object>();
@@ -366,7 +365,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
em.createConnection( firstUserEntity, "likes", entity );
- things.add( entity );
+ things.put( entity.getUuid(), entity );
}
@@ -380,15 +379,14 @@ public class EntityConnectionsIT extends AbstractCoreIT {
int checkedIndex = 0;
for(; checkedIndex < connectionCount && itr.hasNext(); checkedIndex ++){
final Entity returned = ( Entity ) itr.next();
- final Entity expected = things.get( checkedIndex );
+ final Entity expected = things.get( returned.getUuid() );
assertEquals("Entity expected", expected, returned);
}
assertEquals("Checked all entities", connectionCount, checkedIndex );
-
-
}
+
//
//
// @Test
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
index e9e6163..1e8ded5 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
@@ -39,7 +39,6 @@ public class EntityTest {
@Test
- // @Ignore( "Fix this then enable EntityTest.testEntityClasses:45 » ConcurrentModification" )
public void testEntityClasses() throws Exception {
logger.info( "testEntityClasses" );
@@ -75,7 +74,6 @@ public class EntityTest {
@SuppressWarnings("unchecked")
@Test
- // @Ignore( "Fix this and enable: EntityTest.testJson:83 » ConcurrentModification" )
public void testJson() throws Exception {
User user = new User();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
index d780f85..3c04ce6 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
@@ -108,7 +108,6 @@ public class GeoQueryBooleanTest extends AbstractCoreIT {
@Test
- //@Ignore // work in progress
public void testGeoQueryWithNot() throws Exception {
log.info( "GeoQueryBooleanTest.testGeoQueryWithOr" );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
index a9f9cb7..9000c75 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
@@ -80,7 +80,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
-//@Ignore( "Kills cassandra, needs to be part of functional testing" )
public class GraphManagerShardConsistencyIT {
private static final Logger log = LoggerFactory.getLogger( GraphManagerShardConsistencyIT.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
index 2e3a163..e3ec07c 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
@@ -223,12 +223,9 @@ public class PagingResourceIT extends AbstractRestIT {
* Pages through entities that are connected to each other
* @throws IOException
*/
- @Ignore("This does not return a page for any entities. It just keeps returning them in bulk."
- + " Not sure about intended functionality")
@Test
public void pageThroughConnectedEntities() throws IOException {
-
long created = 0;
int numOfEntities = 100;
int numOfPages = 10;
@@ -238,7 +235,7 @@ public class PagingResourceIT extends AbstractRestIT {
for ( created = 1; created <= numOfEntities; created++ ) {
- entityPayload.put( "name", "value" + created );
+ entityPayload.put( "name", created );
Entity entity = new Entity( entityPayload );
entity = this.app().collection( collectionName ).post( entity );
refreshIndex();
@@ -252,11 +249,11 @@ public class PagingResourceIT extends AbstractRestIT {
refreshIndex();
- Collection colConnection = this.app().collection( collectionName ).entity(connectedEntity).connection("likes").get();
- assertNotNull(colConnection);
- assertNotNull( colConnection.getCursor() );
- pageAndVerifyEntities(collectionName, null, numOfPages, numOfEntities);
+ QueryParameters qp = new QueryParameters();
+ qp.setQuery("select * order by created asc");
+ qp.setLimit(10);
+ pageAndVerifyEntities(collectionName, qp, numOfPages, numOfEntities);
}