DATACASS-33: WIP: trying to get past OOM errors & not succeeding yet

This commit is contained in:
Matthew Adams
2014-01-13 15:43:24 -06:00
parent add97be80d
commit 7b9f48f940
4 changed files with 15 additions and 4 deletions

View File

@@ -265,7 +265,7 @@
<version>${failsafe.version}</version>
<configuration>
<!-- <forkMode>always</forkMode> -->
<argLine>-Xmx2048m -XX:MaxPermSize=512m</argLine>
<argLine>-Xmx2048m -Xss1024m -XX:MaxPermSize=512m</argLine>
<useFile>false</useFile>
<includes>
<include>**/test/integration/**/*.java</include>

View File

@@ -4,6 +4,7 @@ import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.junit.Test;
import org.springframework.cassandra.config.KeyspaceAttributes;
@@ -51,7 +52,7 @@ public class CreateKeyspaceCqlGeneratorTests {
public static class BasicTest extends CreateKeyspaceTest {
public String name = "mykeyspace";
public String name = randomKeyspaceName();
public Boolean durableWrites = true;
public Map<Option, Object> replicationMap = KeyspaceAttributes.newSimpleReplication();
@@ -76,7 +77,7 @@ public class CreateKeyspaceCqlGeneratorTests {
public static class NetworkTopologyTest extends CreateKeyspaceTest {
public String name = "mykeyspace";
public String name = randomKeyspaceName();
public Boolean durableWrites = false;
public Map<Option, Object> replicationMap = new HashMap<Option, Object>();

View File

@@ -24,12 +24,14 @@ public class DropKeyspaceCqlGeneratorTests {
public static class BasicTest extends DropTableTest {
public String name = "mykeyspace";
public String name = randomKeyspaceName();
@Override
public DropKeyspaceSpecification specification() {
return DropKeyspaceSpecification.dropKeyspace().name(name);
}
@Override
public DropKeyspaceCqlGenerator generator() {
return new DropKeyspaceCqlGenerator(specification);
}

View File

@@ -1,5 +1,8 @@
package org.springframework.cassandra.test.unit.core.cql.generator;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.junit.Test;
import org.springframework.cassandra.core.cql.generator.KeyspaceNameCqlGenerator;
import org.springframework.cassandra.core.cql.generator.TableNameCqlGenerator;
@@ -36,4 +39,9 @@ public abstract class KeyspaceOperationCqlGeneratorTest<S extends KeyspaceNameSp
public String generateCql() {
return generator.toCql();
}
public String randomKeyspaceName() {
String name = getClass().getSimpleName() + "_" + UUID.randomUUID().toString().replace("-", "");
return StringUtils.left(name, 47).toLowerCase();
}
}