accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [50/54] [abbrv] accumulo git commit: ACCUMULO-3005 Fixed Thrift IT to just check for OK response
Date Thu, 06 Jul 2017 20:43:44 GMT
ACCUMULO-3005 Fixed Thrift IT to just check for OK response


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/335d1600
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/335d1600
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/335d1600

Branch: refs/heads/master
Commit: 335d16001ee9882565ff6c907d02374841414c9b
Parents: 680b3a2
Author: Mike Miller <mmiller@apache.org>
Authored: Thu May 25 17:03:22 2017 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Jul 6 16:22:41 2017 -0400

----------------------------------------------------------------------
 .../accumulo/test/ThriftServerBindsBeforeZooKeeperLockIT.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/335d1600/test/src/main/java/org/apache/accumulo/test/ThriftServerBindsBeforeZooKeeperLockIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/ThriftServerBindsBeforeZooKeeperLockIT.java
b/test/src/main/java/org/apache/accumulo/test/ThriftServerBindsBeforeZooKeeperLockIT.java
index aa6ca6b..76e0c67 100644
--- a/test/src/main/java/org/apache/accumulo/test/ThriftServerBindsBeforeZooKeeperLockIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ThriftServerBindsBeforeZooKeeperLockIT.java
@@ -92,10 +92,12 @@ public class ThriftServerBindsBeforeZooKeeperLockIT extends AccumuloClusterHarne
           try {
             HttpURLConnection cnxn = (HttpURLConnection) url.openConnection();
             final int responseCode = cnxn.getResponseCode();
-            final String errorText = FunctionalTestUtils.readAll(cnxn.getErrorStream());
+            String errorText;
             // This is our "assertion", but we want to re-check it if it's not what we expect
-            if (HttpURLConnection.HTTP_UNAVAILABLE == responseCode && null != errorText
&& errorText.contains("This is not the active Monitor")) {
+            if (HttpURLConnection.HTTP_OK == responseCode) {
               return;
+            } else {
+              errorText = FunctionalTestUtils.readAll(cnxn.getErrorStream());
             }
             LOG.debug("Unexpected responseCode and/or error text, will retry: '{}' '{}'",
responseCode, errorText);
           } catch (Exception e) {


Mime
View raw message