You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/02/10 17:13:00 UTC
[2/2] qpid-jms git commit: Remove as these tests are now covered in
the client brokerless tests.
Remove as these tests are now covered in the client brokerless tests.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/285f24e0
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/285f24e0
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/285f24e0
Branch: refs/heads/master
Commit: 285f24e0726a80428005f63d00f96f354e944faa
Parents: d1dd633
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Feb 10 11:12:47 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Feb 10 11:12:47 2015 -0500
----------------------------------------------------------------------
.../qpid/jms/failover/FailoverProviderTest.java | 97 --------------------
1 file changed, 97 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/285f24e0/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/FailoverProviderTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/FailoverProviderTest.java b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/FailoverProviderTest.java
deleted file mode 100644
index f57c7b8..0000000
--- a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/FailoverProviderTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.
- */
-package org.apache.qpid.jms.failover;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.qpid.jms.provider.DefaultProviderListener;
-import org.apache.qpid.jms.provider.Provider;
-import org.apache.qpid.jms.provider.failover.FailoverProvider;
-import org.apache.qpid.jms.provider.failover.FailoverProviderFactory;
-import org.apache.qpid.jms.support.AmqpTestSupport;
-import org.junit.Test;
-
-/**
- * Test basic functionality of the FailoverProvider class.
- */
-public class FailoverProviderTest extends AmqpTestSupport {
-
- @Test(timeout=60000)
- public void testFailoverCreate() throws Exception {
- URI brokerURI = new URI("failover:" + getBrokerAmqpConnectionURI());
- Provider asyncProvider = FailoverProviderFactory.create(brokerURI);
- assertNotNull(asyncProvider);
- FailoverProvider provider = (FailoverProvider) asyncProvider;
- assertNotNull(provider);
- provider.close();
- }
-
- @Test(timeout=60000)
- public void testFailoverURIConfiguration() throws Exception {
- URI brokerURI = new URI("failover://(" + getBrokerAmqpConnectionURI() + ")" +
- "?failover.maxReconnectDelay=1000" +
- "&failover.useReconnectBackOff=false" +
- "&failover.maxReconnectAttempts=10" +
- "&failover.startupMaxReconnectAttempts=20");
- Provider asyncProvider = FailoverProviderFactory.create(brokerURI);
- assertNotNull(asyncProvider);
- FailoverProvider provider = (FailoverProvider) asyncProvider;
- assertNotNull(provider);
-
- assertEquals(1000, provider.getMaxReconnectDelay());
- assertFalse(provider.isUseReconnectBackOff());
- assertEquals(10, provider.getMaxReconnectAttempts());
- assertEquals(20, provider.getStartupMaxReconnectAttempts());
- provider.close();
- }
-
- @Test(timeout=60000)
- public void testStartupReconnectAttempts() throws Exception {
- URI brokerURI = new URI("failover://(amqp://localhost:61616)" +
- "?failover.maxReconnectDelay=100&failover.startupMaxReconnectAttempts=5");
- Provider asyncProvider = FailoverProviderFactory.create(brokerURI);
- assertNotNull(asyncProvider);
- FailoverProvider provider = (FailoverProvider) asyncProvider;
- assertNotNull(provider);
-
- assertEquals(100, provider.getMaxReconnectDelay());
- assertEquals(5, provider.getStartupMaxReconnectAttempts());
-
- final CountDownLatch failed = new CountDownLatch(1);
-
- provider.setProviderListener(new DefaultProviderListener() {
-
- @Override
- public void onConnectionFailure(IOException ex) {
- failed.countDown();
- }
- });
-
- provider.connect();
-
- assertTrue("Did not trip latch within expected time", failed.await(2, TimeUnit.SECONDS));
- provider.close();
- }
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org