brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [3/4] brooklyn-server git commit: Simplifying the test according the PR comments
Date Thu, 17 Nov 2016 16:43:37 GMT
Simplifying the test according the PR comments

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/bc54334c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/bc54334c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/bc54334c

Branch: refs/heads/master
Commit: bc54334c2838eaefe52096d6f2de1054840d33fc
Parents: a8cef3f
Author: Yavor Yanchev <yavor@yanchev.com>
Authored: Thu Nov 17 11:20:42 2016 +0200
Committer: Yavor Yanchev <yavor@yanchev.com>
Committed: Thu Nov 17 11:20:42 2016 +0200

----------------------------------------------------------------------
 .../apache/brooklyn/util/executor/HttpExecutorImplTest.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/bc54334c/core/src/test/java/org/apache/brooklyn/util/executor/HttpExecutorImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/executor/HttpExecutorImplTest.java
b/core/src/test/java/org/apache/brooklyn/util/executor/HttpExecutorImplTest.java
index 233d7a6..46e84a0 100644
--- a/core/src/test/java/org/apache/brooklyn/util/executor/HttpExecutorImplTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/executor/HttpExecutorImplTest.java
@@ -97,11 +97,9 @@ public class HttpExecutorImplTest {
                 .uri(baseUrl.toURI())
                 .build();
         HttpResponse executorResponse = executor.execute(executorRequest);
-        assertTrue(executorResponse.headers().containsKey(HTTP_RESPONSE_CUSTOM_HEADER_KEY));
-        assertTrue(Iterables.getOnlyElement(executorResponse.headers().get(HTTP_RESPONSE_HEADER_KEY)).equals(HTTP_RESPONSE_HEADER_VALUE));
-
-        assertTrue(executorResponse.headers().containsKey(HTTP_RESPONSE_HEADER_KEY));
-        assertTrue(Iterables.getOnlyElement(executorResponse.headers().get(HTTP_RESPONSE_CUSTOM_HEADER_KEY)).equals(HTTP_RESPONSE_CUSTOM_HEADER_VALUE));
+        Multimap<String, String> actualHeaders = executorResponse.headers();
+        assertEquals(Iterables.getOnlyElement(actualHeaders.get(HTTP_RESPONSE_CUSTOM_HEADER_KEY)),
HTTP_RESPONSE_CUSTOM_HEADER_VALUE);
+        assertEquals(Iterables.getOnlyElement(actualHeaders.get(HTTP_RESPONSE_HEADER_KEY)),
HTTP_RESPONSE_HEADER_VALUE);
     }
 
     @Test


Mime
View raw message