hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1773573 - in /httpcomponents/httpcore/trunk: httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/BasicPingHandler.java httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http2/Http2IntegrationTest.java
Date Sun, 11 Dec 2016 14:50:56 GMT
Author: olegk
Date: Sun Dec 11 14:50:56 2016
New Revision: 1773573

URL: http://svn.apache.org/viewvc?rev=1773573&view=rev
Log:
RFC 7540: Ping support (cleanup of test code committed by mistake)

Modified:
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/BasicPingHandler.java
    httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http2/Http2IntegrationTest.java

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/BasicPingHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/BasicPingHandler.java?rev=1773573&r1=1773572&r2=1773573&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/BasicPingHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/BasicPingHandler.java
Sun Dec 11 14:50:56 2016
@@ -56,11 +56,7 @@ public class BasicPingHandler implements
     public void consumeResponse(final ByteBuffer feedback) throws HttpException, IOException
{
         boolean result = true;
         for (int i = 0; i < PING_MESSAGE.length; i++) {
-            final byte b = feedback.get();
-            System.out.println("PING " + b);
-//            if (!feedback.hasRemaining() || PING_MESSAGE[i] != b) {
-            if (PING_MESSAGE[i] != b) {
-                System.out.println("MISMATCH");
+            if (!feedback.hasRemaining() || PING_MESSAGE[i] != feedback.get()) {
                 result = false;
                 break;
             }

Modified: httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http2/Http2IntegrationTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http2/Http2IntegrationTest.java?rev=1773573&r1=1773572&r2=1773573&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http2/Http2IntegrationTest.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/http2/Http2IntegrationTest.java
Sun Dec 11 14:50:56 2016
@@ -935,7 +935,6 @@ public class Http2IntegrationTest extend
         final int n = 10;
         final CountDownLatch latch = new CountDownLatch(n);
         final AtomicInteger count = new AtomicInteger(0);
-        final Queue<Future<String>> queue = new LinkedList<>();
         for (int i = 0; i < n; i++) {
             streamEndpoint.execute(
                     new BasicRequestProducer("GET", createRequestURI(serverEndpoint, "/hello")),



Mime
View raw message