Repository: cassandra Updated Branches: refs/heads/trunk 371ad9eea -> 25a0a7130
Fix CQLTester patch by snazy; reviewed by blerer for CASSANDRA-8392 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/25a0a713 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/25a0a713 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/25a0a713 Branch: refs/heads/trunk Commit: 25a0a71307c269db450ce96c667c2af7d702137c Parents: 371ad9e Author: Sylvain Lebresne <sylv...@datastax.com> Authored: Fri Nov 28 19:06:47 2014 +0100 Committer: Sylvain Lebresne <sylv...@datastax.com> Committed: Fri Nov 28 19:06:47 2014 +0100 ---------------------------------------------------------------------- test/unit/org/apache/cassandra/cql3/CQLTester.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/25a0a713/test/unit/org/apache/cassandra/cql3/CQLTester.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/cql3/CQLTester.java b/test/unit/org/apache/cassandra/cql3/CQLTester.java index 68f90bd..eb73ff9 100644 --- a/test/unit/org/apache/cassandra/cql3/CQLTester.java +++ b/test/unit/org/apache/cassandra/cql3/CQLTester.java @@ -32,7 +32,6 @@ import java.util.concurrent.atomic.AtomicInteger; import com.google.common.base.Objects; import com.google.common.collect.ImmutableSet; -import org.apache.cassandra.utils.ByteBufferUtil; import org.junit.AfterClass; import org.junit.After; import org.junit.Assert; @@ -276,7 +275,7 @@ public abstract class CQLTester protected String createType(String query) { - String typeName = callerName() + "_type_" + seqNumber.getAndIncrement(); + String typeName = "type_" + seqNumber.getAndIncrement(); String fullQuery = String.format(query, KEYSPACE + "." + typeName); currentTypes.add(typeName); logger.info(fullQuery); @@ -286,7 +285,7 @@ public abstract class CQLTester protected String createFunction(String keyspace, String argTypes, String query) throws Throwable { - String functionName = keyspace + "." + callerName() + "_function_" + seqNumber.getAndIncrement(); + String functionName = keyspace + ".function_" + seqNumber.getAndIncrement(); createFunctionOverload(functionName, argTypes, query); return functionName; } @@ -301,7 +300,7 @@ public abstract class CQLTester protected String createAggregate(String keyspace, String argTypes, String query) throws Throwable { - String aggregateName = keyspace + "." + callerName() + "_aggregate_" + seqNumber.getAndIncrement(); + String aggregateName = keyspace + "." + "aggregate_" + seqNumber.getAndIncrement(); createAggregateOverload(aggregateName, argTypes, query); return aggregateName; } @@ -316,7 +315,7 @@ public abstract class CQLTester protected void createTable(String query) { - currentTable = callerName() + "_table_" + seqNumber.getAndIncrement(); + currentTable = "table_" + seqNumber.getAndIncrement(); String fullQuery = formatQuery(query); logger.info(fullQuery); schemaChange(fullQuery); @@ -324,7 +323,7 @@ public abstract class CQLTester protected void createTableMayThrow(String query) throws Throwable { - currentTable = callerName() + "_table_" + seqNumber.getAndIncrement(); + currentTable = "table_" + seqNumber.getAndIncrement(); String fullQuery = formatQuery(query); logger.info(fullQuery); try @@ -393,11 +392,6 @@ public abstract class CQLTester schemaChange(fullQuery); } - private static String callerName() - { - return new Exception().getStackTrace()[2].getMethodName().toLowerCase(); - } - private static void schemaChange(String query) { try