External tests working except for old static org/app tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/d4ecbe17 Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/d4ecbe17 Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/d4ecbe17 Branch: refs/heads/two-dot-o Commit: d4ecbe17a3063f902d211c8a02e9ba3c1e8de284 Parents: ef9e94e Author: Todd Nine <[email protected]> Authored: Fri Nov 7 09:20:42 2014 -0700 Committer: Todd Nine <[email protected]> Committed: Fri Nov 7 09:20:42 2014 -0700 ---------------------------------------------------------------------- .../config/src/test/resources/usergrid-test.properties | 2 +- .../src/test/resources/usergrid-custom-test.properties | 4 ++-- .../migration/data/MigrationInfoSerializationImpl.java | 2 +- .../migration/data/MigrationInfoSerializationTest.java | 13 ++++++++++++- .../src/test/resources/dynamic-test.properties | 2 +- .../src/test/resources/usergrid-UNIT.properties | 2 +- .../src/test/resources/usergrid-custom-test.properties | 4 ++-- .../src/test/resources/usergrid-custom-test.properties | 4 ++-- .../src/test/resources/usergrid-custom-test.properties | 2 +- 9 files changed, 23 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/config/src/test/resources/usergrid-test.properties ---------------------------------------------------------------------- diff --git a/stack/config/src/test/resources/usergrid-test.properties b/stack/config/src/test/resources/usergrid-test.properties index fc654f9..7d1da1e 100644 --- a/stack/config/src/test/resources/usergrid-test.properties +++ b/stack/config/src/test/resources/usergrid-test.properties @@ -58,7 +58,7 @@ cassandra.writecl=QUORUM #Keyspace to use for locking cassandra.lock.keyspace=Locks -elasticsearch.startup=forked +elasticsearch.startup=external elasticsearch.cluster_name=test_cluster #Properties to control the number of buckets in the index. http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/core/src/test/resources/usergrid-custom-test.properties ---------------------------------------------------------------------- diff --git a/stack/core/src/test/resources/usergrid-custom-test.properties b/stack/core/src/test/resources/usergrid-custom-test.properties index 6917df0..a1ff5b2 100644 --- a/stack/core/src/test/resources/usergrid-custom-test.properties +++ b/stack/core/src/test/resources/usergrid-custom-test.properties @@ -14,8 +14,8 @@ # these settings allow tests to run and consistently pass on 16GB MacBook Pro # with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml) -cassandra.startup=embedded -elasticsearch.startup=embedded +cassandra.startup=external +elasticsearch.startup=external cassandra.timeout=2000 cassandra.connections=1000 hystrix.threadpool.graph_user.coreSize=50 http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationImpl.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationImpl.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationImpl.java index 0460e33..5dbadee 100644 --- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationImpl.java +++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationImpl.java @@ -62,7 +62,7 @@ public class MigrationInfoSerializationImpl implements MigrationInfoSerializatio private static final StringSerializer STRING_SERIALIZER = StringSerializer.get(); - private static final MultiTennantColumnFamily<ScopedRowKey<String>, String> CF_MIGRATION_INFO = + public static final MultiTennantColumnFamily<ScopedRowKey<String>, String> CF_MIGRATION_INFO = new MultiTennantColumnFamily<>( "Data_Migration_Info", ROW_KEY_SER, STRING_SERIALIZER ); http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationTest.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationTest.java b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationTest.java index 4742496..598d107 100644 --- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationTest.java +++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/migration/data/MigrationInfoSerializationTest.java @@ -27,6 +27,8 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; +import org.apache.usergrid.persistence.core.migration.schema.MigrationException; +import org.apache.usergrid.persistence.core.migration.schema.MigrationManager; import org.apache.usergrid.persistence.core.test.ITRunner; import org.apache.usergrid.persistence.core.guice.MigrationManagerRule; import org.apache.usergrid.persistence.core.guice.TestCommonModule; @@ -35,6 +37,7 @@ import org.apache.usergrid.persistence.core.test.UseModules; import com.google.inject.Inject; import com.netflix.astyanax.Keyspace; +import com.netflix.astyanax.connectionpool.exceptions.ConnectionException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -49,6 +52,9 @@ public class MigrationInfoSerializationTest { public MigrationManagerRule migrationManagerRule; @Inject + public MigrationManager migrationManager; + + @Inject protected Keyspace keyspace; @@ -60,7 +66,12 @@ public class MigrationInfoSerializationTest { @Test - public void basicTest(){ + public void basicTest() throws ConnectionException, MigrationException { + + //drop the column family, then run setup + keyspace.dropColumnFamily( MigrationInfoSerializationImpl.CF_MIGRATION_INFO.getName() ); + + migrationManager.migrate(); //test getting nothing works final String emptyStatus = migrationInfoSerialization.getStatusMessage(); http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties ---------------------------------------------------------------------- diff --git a/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties b/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties index bf862de..3d4582f 100644 --- a/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties +++ b/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties @@ -10,7 +10,7 @@ cassandra.timeout=5000 index.query.limit.default=10 elasticsearch.indexname=Usergrid -elasticsearch.startup=embedded +elasticsearch.startup=external elasticsearch.force-refresh=false http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties ---------------------------------------------------------------------- diff --git a/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties index 032d5c5..d7d3909 100644 --- a/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties +++ b/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties @@ -13,7 +13,7 @@ collections.keyspace.strategy.options=replication_factor:1 collections.keyspace.strategy.class=org.apache.cassandra.locator.SimpleStrategy collection.stage.transient.timeout=6 -elasticsearch.startup=forked +elasticsearch.startup=external elasticsearch.cluster_name=usergrid elasticsearch.index_prefix=usergrid elasticsearch.hosts=127.0.0.1 http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/rest/src/test/resources/usergrid-custom-test.properties ---------------------------------------------------------------------- diff --git a/stack/rest/src/test/resources/usergrid-custom-test.properties b/stack/rest/src/test/resources/usergrid-custom-test.properties index 8d39006..ef615a2 100644 --- a/stack/rest/src/test/resources/usergrid-custom-test.properties +++ b/stack/rest/src/test/resources/usergrid-custom-test.properties @@ -17,11 +17,11 @@ tomcat.startup=embedded tomcat.threads=200 -cassandra.startup=forked +cassandra.startup=external cassandra.timeout=2000 cassandra.connections=800 -elasticsearch.startup=forked +elasticsearch.startup=external hystrix.threadpool.graph_user.coreSize=1200 hystrix.threadpool.graph_async.coreSize=1200 http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/services/src/test/resources/usergrid-custom-test.properties ---------------------------------------------------------------------- diff --git a/stack/services/src/test/resources/usergrid-custom-test.properties b/stack/services/src/test/resources/usergrid-custom-test.properties index c39fe3e..5481a43 100644 --- a/stack/services/src/test/resources/usergrid-custom-test.properties +++ b/stack/services/src/test/resources/usergrid-custom-test.properties @@ -14,8 +14,8 @@ # these settings allow tests to run and consistently pass on 16GB MacBook Pro # with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml) -cassandra.startup=embedded -elasticsearch.startup=embedded +cassandra.startup=external +elasticsearch.startup=external cassandra.timeout=2000 cassandra.connections=1000 http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d4ecbe17/stack/test-utils/src/test/resources/usergrid-custom-test.properties ---------------------------------------------------------------------- diff --git a/stack/test-utils/src/test/resources/usergrid-custom-test.properties b/stack/test-utils/src/test/resources/usergrid-custom-test.properties index 0ff85ff..5a463aa 100644 --- a/stack/test-utils/src/test/resources/usergrid-custom-test.properties +++ b/stack/test-utils/src/test/resources/usergrid-custom-test.properties @@ -15,4 +15,4 @@ # limitations under the License. -cassandra.startup=forked \ No newline at end of file +cassandra.startup=external
