You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by li...@apache.org on 2023/02/10 09:24:46 UTC
[tomcat] branch 10.1.x updated: Revert TestAsyncContextImpl.
This is an automated email from the ASF dual-hosted git repository.
lihan pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 5bff34bfec Revert TestAsyncContextImpl.
5bff34bfec is described below
commit 5bff34bfec80a38de933171c36c9b5691bfbbe82
Author: lihan <li...@apache.org>
AuthorDate: Fri Feb 10 17:24:03 2023 +0800
Revert TestAsyncContextImpl.
---
test/org/apache/catalina/core/TestAsyncContextImpl.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index fc755166b2..14621803ed 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -1521,10 +1521,15 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
// Just for debugging
async.setTimeout(100000);
- try (ExecutorService executor = Executors.newSingleThreadExecutor()) {
- executor.submit(() -> async.dispatch("/ServletC"));
- executor.shutdown();
- }
+ ExecutorService executor = Executors.newSingleThreadExecutor();
+ executor.submit(new Runnable() {
+
+ @Override
+ public void run() {
+ async.dispatch("/ServletC");
+ }
+ });
+ executor.shutdown();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [tomcat] branch 10.1.x updated: Revert TestAsyncContextImpl.
Posted by Han Li <li...@apache.org>.
> On Feb 10, 2023, at 17:24, lihan@apache.org wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> lihan pushed a commit to branch 10.1.x
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/10.1.x by this push:
> new 5bff34bfec Revert TestAsyncContextImpl.
> 5bff34bfec is described below
>
> commit 5bff34bfec80a38de933171c36c9b5691bfbbe82
> Author: lihan <li...@apache.org>
> AuthorDate: Fri Feb 10 17:24:03 2023 +0800
>
> Revert TestAsyncContextImpl.
> ---
> test/org/apache/catalina/core/TestAsyncContextImpl.java | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java b/test/org/apache/catalina/core/TestAsyncContextImpl.java
> index fc755166b2..14621803ed 100644
> --- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
> +++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
> @@ -1521,10 +1521,15 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
> // Just for debugging
> async.setTimeout(100000);
>
> - try (ExecutorService executor = Executors.newSingleThreadExecutor()) {
> - executor.submit(() -> async.dispatch("/ServletC"));
> - executor.shutdown();
> - }
This way of writing is only possible on JDK 19 onward, which I did not notice.
Han
> + ExecutorService executor = Executors.newSingleThreadExecutor();
> + executor.submit(new Runnable() {
> +
> + @Override
> + public void run() {
> + async.dispatch("/ServletC");
> + }
> + });
> + executor.shutdown();
> }
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org