You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2019/03/03 23:29:00 UTC

[tomcat] branch 8.5.x updated: Fix test after API update

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 5975c4d  Fix test after API update
5975c4d is described below

commit 5975c4dcd590e866cccca815507034afcb1e8055
Author: remm <re...@apache.org>
AuthorDate: Mon Mar 4 00:28:52 2019 +0100

    Fix test after API update
---
 .../org/apache/coyote/http11/upgrade/TestUpgradeInternalHandler.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http11/upgrade/TestUpgradeInternalHandler.java b/test/org/apache/coyote/http11/upgrade/TestUpgradeInternalHandler.java
index 9cc050c..5209edc 100644
--- a/test/org/apache/coyote/http11/upgrade/TestUpgradeInternalHandler.java
+++ b/test/org/apache/coyote/http11/upgrade/TestUpgradeInternalHandler.java
@@ -49,6 +49,7 @@ import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.net.SSLSupport;
 import org.apache.tomcat.util.net.SocketEvent;
 import org.apache.tomcat.util.net.SocketWrapperBase;
+import org.apache.tomcat.util.net.SocketWrapperBase.BlockingMode;
 import org.apache.tomcat.util.net.SocketWrapperBase.CompletionState;
 
 public class TestUpgradeInternalHandler extends TomcatBaseTest {
@@ -192,7 +193,7 @@ public class TestUpgradeInternalHandler extends TomcatBaseTest {
             // Note: the completion check used will not call the completion handler if the IO completed inline and without error.
             // Using a completion check that always calls complete would be easier here since the action is the same even with inline completion.
             final ByteBuffer buffer = ByteBuffer.allocate(1024);
-            CompletionState state = wrapper.read(false, 10, TimeUnit.SECONDS, null, SocketWrapperBase.READ_DATA, new CompletionHandler<Long, Void>() {
+            CompletionState state = wrapper.read(BlockingMode.NON_BLOCK, 10, TimeUnit.SECONDS, null, SocketWrapperBase.READ_DATA, new CompletionHandler<Long, Void>() {
                 @Override
                 public void completed(Long result, Void attachment) {
                     System.out.println("Read: " + result.longValue());
@@ -211,7 +212,7 @@ public class TestUpgradeInternalHandler extends TomcatBaseTest {
 
         private void write(ByteBuffer buffer) {
             buffer.flip();
-            CompletionState state = wrapper.write(true, 10, TimeUnit.SECONDS, null, SocketWrapperBase.COMPLETE_WRITE, new CompletionHandler<Long, Void>() {
+            CompletionState state = wrapper.write(BlockingMode.BLOCK, 10, TimeUnit.SECONDS, null, SocketWrapperBase.COMPLETE_WRITE, new CompletionHandler<Long, Void>() {
                 @Override
                 public void completed(Long result, Void attachment) {
                     System.out.println("Write: " + result.longValue());


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org