Bump to yangtools-2.0.0 and odlparent-3.0.2
[neutron.git] / integration / test / src / test / java / org / opendaylight / neutron / e2etest / NeutronNetworkTests.java
index 7175f50133b83ef86ad4c93fe4ba0010da0028de..eee371a15bc7ca00f28749bf4cc8a0dcfbf515bb 100644 (file)
@@ -31,29 +31,27 @@ public class NeutronNetworkTests {
     }
 
     public void network_collection_get_test_with_wait() throws IOException, InterruptedException {
-        String urlS = base + "/networks";
+        URL url = new URL(base + "/networks");
         for (int retry = 0; retry < TIMEOUT; retry++) {
-            URL url = new URL(urlS);
             HttpURLConnection httpConn = ITNeutronE2E.httpURLConnectionFactoryGet(url);
             int responseCode;
             try {
                 responseCode = httpConn.getResponseCode();
             } catch (ConnectException e) {
-                LOG.info("connection " + Integer.toString(retry) + ": failed", e);
+                LOG.info("connection trial {} failed to URL {}", retry, url, e);
                 Thread.sleep(1000);
                 continue;
             }
 
             if (responseCode != 200) {
-                LOG.info("trial " + Integer.toString(retry) + ": failed with: "
-                        + Integer.toString(httpConn.getResponseCode()));
+                LOG.info("trial {} to URL {} failed with {}", retry, url, httpConn.getResponseCode());
                 Thread.sleep(1000);
             } else {
                 Assert.assertEquals("Network Collection GET failed", 200, httpConn.getResponseCode());
                 return;
             }
         }
-        Assert.assertFalse("Network Collection GET with wait failed", true);
+        Assert.assertFalse("Network Collection GET to URL " + url + " with wait failed", true);
     }
 
     //TODO handle SB check