package com.github.xetorthio.jedisque;

import java.net.URI;
import java.net.URISyntaxException;

import org.junit.Test;

import redis.clients.jedis.exceptions.JedisConnectionException;

public class ConnectionTest {
	@Test
	public void iterateOverHosts() throws URISyntaxException {
		try (Jedisque q = new Jedisque(new URI("disque://localhost:55665"),
				new URI("disque://localhost:7711"))) {
			q.info();
		}
	}

	@Test(expected = JedisConnectionException.class)
	public void throwExceptionWhenNodesAreUnavailbale()
			throws URISyntaxException {
		try (Jedisque q = new Jedisque(new URI("disque://localhost:55665"),
				new URI("disque://localhost:55666"))) {
			q.info();
		}
	}
}

@@ -210,16 +210,17 @@
 nTest %7B%0A
+%0A
 %09@Test%0A%09
@@ -272,37 +272,32 @@
 axException %7B%0A%09%09
-try (
 Jedisque q = new
@@ -334,37 +334,33 @@
 calhost:55665%22),
-%0A%09%09%09%09
+ 
 new URI(%22disque:
@@ -378,23 +378,20 @@
 :7711%22))
-) %7B
+;
 %0A%09%09
-%09
 q.info()
@@ -390,25 +390,35 @@
 q.info();%0A%09%09
-%7D
+q.close();%0A
 %0A%09%7D%0A%0A%09@Test(
@@ -512,20 +512,17 @@
 ilbale()
-%0A%09%09%09
+ 
 throws U
@@ -547,13 +547,8 @@
 %7B%0A%09%09
-try (
 Jedi
@@ -609,13 +609,9 @@
 5%22),
-%0A%09%09%09%09
+ 
 new 
@@ -646,13 +646,10 @@
 6%22))
-)
- %7B%0A%09
+;%0A
 %09%09q.
@@ -658,15 +658,24 @@
 fo();%0A%09%09
-%7D
+q.close();
 %0A%09%7D%0A%7D%0A

Change test strategy in favor of simple testing Update project source to 1.6