summaryrefslogtreecommitdiff
path: root/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config
diff options
context:
space:
mode:
Diffstat (limited to 'java/perftests/src/test/java/org/apache/qpid/disttest/controller/config')
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ClientConfigTest.java5
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest-test-config.js22
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java9
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigTest.java4
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConnectionConfigTest.java5
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConsumerConfigTest.java5
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest-test-config.js22
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java7
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/MessageProviderConfigTest.java5
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ParticipantConfigTest.java2
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ProducerConfigTest.java5
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/SessionConfigTest.java5
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestConfigTest.java5
-rw-r--r--java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestInstanceTest.java5
14 files changed, 70 insertions, 36 deletions
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ClientConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ClientConfigTest.java
index d4af439dea..4bf4307eaf 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ClientConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ClientConfigTest.java
@@ -29,16 +29,15 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.client.property.PropertyValue;
import org.apache.qpid.disttest.client.property.SimplePropertyValue;
import org.apache.qpid.disttest.controller.CommandForClient;
import org.apache.qpid.disttest.message.Command;
import org.apache.qpid.disttest.message.CreateMessageProviderCommand;
import org.apache.qpid.disttest.message.NoOpCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class ClientConfigTest extends TestCase
+public class ClientConfigTest extends QpidTestCase
{
private static final String CLIENT1 = "client1";
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest-test-config.js b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest-test-config.js
index 07f8bf9d92..527300eff4 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest-test-config.js
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest-test-config.js
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
jsonObject = {
"_tests":
QPID.iterations( { "__ACK_MODE": [ 0, 1 ] },
@@ -31,4 +51,4 @@ jsonObject = {
)
})
-} \ No newline at end of file
+}
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java
index 257f139849..e208945901 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java
@@ -23,12 +23,12 @@ import java.io.Reader;
import java.util.List;
import java.util.Map;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.ConfigFileTestHelper;
import org.apache.qpid.disttest.client.property.PropertyValue;
+import org.apache.qpid.test.utils.QpidTestCase;
+import org.apache.qpid.test.utils.TestFileUtils;
-public class ConfigReaderTest extends TestCase
+public class ConfigReaderTest extends QpidTestCase
{
private Config _config;
@@ -111,8 +111,9 @@ public class ConfigReaderTest extends TestCase
public void testReadsJS() throws Exception
{
ConfigReader configReader = new ConfigReader();
- String path = getClass().getResource("ConfigReaderTest-test-config.js").toURI().getPath();
+ String path = TestFileUtils.createTempFileFromResource(this, "ConfigReaderTest-test-config.js").getAbsolutePath();
_config = configReader.getConfigFromFile(path);
+
List<TestConfig> testConfigs = _config.getTestConfigs();
assertEquals("Unexpected number of tests", 2, testConfigs.size());
TestConfig testConfig1 = _config.getTestConfigs().get(0);
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigTest.java
index 88750b9737..291ce2af78 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigTest.java
@@ -24,9 +24,9 @@ import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.List;
-import junit.framework.TestCase;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class ConfigTest extends TestCase
+public class ConfigTest extends QpidTestCase
{
public void testGetTestsForTestWithIteratingMessageSizes()
{
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConnectionConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConnectionConfigTest.java
index 7c839ed462..0eee80e425 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConnectionConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConnectionConfigTest.java
@@ -27,13 +27,12 @@ import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.List;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.message.Command;
import org.apache.qpid.disttest.message.CreateConnectionCommand;
import org.apache.qpid.disttest.message.NoOpCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class ConnectionConfigTest extends TestCase
+public class ConnectionConfigTest extends QpidTestCase
{
private static final String CONNECTION_FACTORY_NAME = "ConnectionFactoryName";
private static final String CONNECTION_NAME = "ConnectionName";
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConsumerConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConsumerConfigTest.java
index c011ff4711..0aa05a176e 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConsumerConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConsumerConfigTest.java
@@ -19,11 +19,10 @@
*/
package org.apache.qpid.disttest.controller.config;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.message.CreateConsumerCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class ConsumerConfigTest extends TestCase
+public class ConsumerConfigTest extends QpidTestCase
{
public void testConsumerHasZeroArgConstructorForGson()
{
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest-test-config.js b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest-test-config.js
index f64af82feb..eab98e8bd7 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest-test-config.js
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest-test-config.js
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
jsonObject = {
"_countries":
QPID.iterations( { "__ITERATING_VALUE": [ 0, 1 ] },
@@ -20,4 +40,4 @@ jsonObject = {
)
})
-} \ No newline at end of file
+}
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java
index eb4063888b..55c1d4a7bd 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java
@@ -25,15 +25,16 @@ import static org.apache.commons.beanutils.PropertyUtils.getProperty;
import java.util.List;
import java.util.TreeMap;
-import junit.framework.TestCase;
+import org.apache.qpid.test.utils.QpidTestCase;
+import org.apache.qpid.test.utils.TestFileUtils;
import com.google.gson.Gson;
-public class JavaScriptConfigEvaluatorTest extends TestCase
+public class JavaScriptConfigEvaluatorTest extends QpidTestCase
{
public void testEvaluateJavaScript() throws Exception
{
- String jsFilePath = getClass().getResource("JavaScriptConfigEvaluatorTest-test-config.js").toURI().getPath();
+ String jsFilePath = TestFileUtils.createTempFileFromResource(this, "JavaScriptConfigEvaluatorTest-test-config.js").getAbsolutePath();
String rawConfig = new JavaScriptConfigEvaluator().evaluateJavaScript(jsFilePath);
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/MessageProviderConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/MessageProviderConfigTest.java
index a3b367a4b4..148c07b1ca 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/MessageProviderConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/MessageProviderConfigTest.java
@@ -21,13 +21,12 @@ package org.apache.qpid.disttest.controller.config;
import java.util.HashMap;
import java.util.Map;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.client.property.PropertyValue;
import org.apache.qpid.disttest.client.property.SimplePropertyValue;
import org.apache.qpid.disttest.message.CreateMessageProviderCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class MessageProviderConfigTest extends TestCase
+public class MessageProviderConfigTest extends QpidTestCase
{
public void testCreateCommandsForMessageProvider()
{
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ParticipantConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ParticipantConfigTest.java
index f58cc628a4..b6efd68cbd 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ParticipantConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ParticipantConfigTest.java
@@ -32,7 +32,7 @@ public class ParticipantConfigTest extends QpidTestCase
setTestSystemProperty(ParticipantConfig.DURATION_OVERRIDE_SYSTEM_PROPERTY, String.valueOf(overriddenDuration));
CreateParticpantCommand createParticipantCommand = mock(CreateParticpantCommand.class);
- ParticipantConfig participantConfig = new ParticipantConfig("name", "destinationName", 1, 2, 5000)
+ ParticipantConfig participantConfig = new ParticipantConfig("name", "destinationName", false, 1, 2, 5000)
{
};
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ProducerConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ProducerConfigTest.java
index b9e591f113..44fca4bb7c 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ProducerConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ProducerConfigTest.java
@@ -22,11 +22,10 @@ package org.apache.qpid.disttest.controller.config;
import javax.jms.DeliveryMode;
import javax.jms.Message;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.message.CreateProducerCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class ProducerConfigTest extends TestCase
+public class ProducerConfigTest extends QpidTestCase
{
public void testProducerHasZeroArgConstructorForGson()
{
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/SessionConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/SessionConfigTest.java
index 8775e4064d..02cdbb8fca 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/SessionConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/SessionConfigTest.java
@@ -29,14 +29,13 @@ import java.util.List;
import javax.jms.Session;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.message.Command;
import org.apache.qpid.disttest.message.CreateConsumerCommand;
import org.apache.qpid.disttest.message.CreateProducerCommand;
import org.apache.qpid.disttest.message.CreateSessionCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class SessionConfigTest extends TestCase
+public class SessionConfigTest extends QpidTestCase
{
private static final String CONNECTION_NAME = "conn1";
private static final String SESSION = "session1";
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestConfigTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestConfigTest.java
index 1212a57606..be7c7a7c8c 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestConfigTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestConfigTest.java
@@ -26,12 +26,11 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.controller.CommandForClient;
import org.apache.qpid.disttest.message.NoOpCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class TestConfigTest extends TestCase
+public class TestConfigTest extends QpidTestCase
{
private static final QueueConfig[] EMPTY_QUEUES_ARRAY = new QueueConfig[0];
private static final String CLIENT1 = "client1";
diff --git a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestInstanceTest.java b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestInstanceTest.java
index 928fbe58cf..187b57c399 100644
--- a/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestInstanceTest.java
+++ b/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/TestInstanceTest.java
@@ -26,14 +26,13 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import junit.framework.TestCase;
-
import org.apache.qpid.disttest.controller.CommandForClient;
import org.apache.qpid.disttest.message.CreateConsumerCommand;
import org.apache.qpid.disttest.message.CreateProducerCommand;
import org.apache.qpid.disttest.message.NoOpCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
-public class TestInstanceTest extends TestCase
+public class TestInstanceTest extends QpidTestCase
{
private static final String CLIENT_NAME = "CLIENT_NAME";
private static final int ITERATION_NUMBER = 0;