qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [2/4] qpid-jms git commit: Initial skeleton test for FailoverProvider
Date Fri, 06 Feb 2015 23:07:51 GMT
Initial skeleton test for FailoverProvider 

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/5f46e457
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/5f46e457
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/5f46e457

Branch: refs/heads/master
Commit: 5f46e45797345bdbc60e97d1805f73707fba7531
Parents: d0ccd40
Author: Timothy Bish <tabish121@gmail.com>
Authored: Fri Feb 6 17:23:38 2015 -0500
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Fri Feb 6 17:23:38 2015 -0500

----------------------------------------------------------------------
 .../provider/failover/FailoverProviderTest.java | 53 ++++++++++++++++++++
 1 file changed, 53 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/5f46e457/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
new file mode 100644
index 0000000..83a5e6f
--- /dev/null
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
@@ -0,0 +1,53 @@
+/**
+ * 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.provider.failover;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test behavior of the FailoverProvider
+ */
+public class FailoverProviderTest {
+
+    private List<URI> uris;
+
+    @Before
+    public void setUp() throws Exception {
+        uris = new ArrayList<URI>();
+
+        uris.add(new URI("mock://192.168.2.1:5672"));
+        uris.add(new URI("mock://192.168.2.2:5672"));
+        uris.add(new URI("mock://192.168.2.3:5672"));
+        uris.add(new URI("mock://192.168.2.4:5672"));
+    }
+
+    @Test
+    public void testCreateProvider() {
+        FailoverProvider provider = new FailoverProvider(uris, Collections.<String, String>emptyMap());
+        assertEquals(FailoverUriPool.DEFAULT_RANDOMIZE_ENABLED, provider.isRandomize());
+        assertNull(provider.getRemoteURI());
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message