[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Abdessamed MANSOURI  changed:

   What|Removed |Added

  Attachment #33796|0   |1
is obsolete||

--- Comment #13 from Abdessamed MANSOURI  ---
Created attachment 33802
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33802=edit
Unit test of bug 59219

Inserting timeout.

About refactoring, of course there's some duplicate code as the servlets,
ServletB can do what ServletA do, but i think like its better, because its more
clear and more explicit for point 2, or not?? :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

--- Comment #12 from Mark Thomas  ---
Comment on attachment 33796
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33796
Unit test of bug 59219

Nice. That is very, very close to what I have. The differences are:
- refactoring to remove duplicate code
- setting the timeout on the async context to speed up some failure modes
- different logic around loop tracking

I'll get this committed shortly so you can see the differences. You'll get a
credit in the commit message.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Abdessamed MANSOURI  changed:

   What|Removed |Added

  Attachment #33784|0   |1
is obsolete||

--- Comment #11 from Abdessamed MANSOURI  ---
Created attachment 33796
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33796=edit
Unit test of bug 59219

Thank you for your useful feedback and especialy your patience and your time
:), i use IntelliJ IDEA Community edition because i'm more familiar with its
debugger and its features, i run ant to convert the project to eclipse project
then import it inside IDEA as eclipse project (ant buildfile doesn't offer
support for IDEA and IDEA supports importing eclipse projects).

The test case pass for point 2, but it doesn't for point 3, i noticed that when
an exception occurs without a dispatch the onError run once, but if the
exception occurs with no matter numbder of dispatch the onError run twice, i
think it a bug in the fix as onError should run only once or the same as the
dispatch has been called (i didn't read the servlet spec).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

--- Comment #10 from Mark Thomas  ---
I've fixed the regression. I held back on committing the test case to give you
a chance to update your proposed patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-21 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

--- Comment #9 from Mark Thomas  ---
And some more:
4. The wait loop logic is wrong.
   - It will always wait 5s even if the output is correct
   - If output in incorrect it will enter an infinite loop
5. It is clearer to define an explicit Wrapper insatnce and then call
   setAsyncSupported(true) on that.
6. The test doesn't pass. This actually highlights a bug in the fix (regression
   in the fix for point 2 when the fix for point 3 was made) which just goes to
   demonstrate the usefulness of test cases.

I have all this fixed locally but I think it would be useful for you to try and
fix these issues yourself.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-21 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

--- Comment #8 from Mark Thomas  ---
Thanks for the patch. It is being looked at. Currently I'm seeing odd behaviour
on Windows so I want to test it on another platform.

I do have some basic feedback at this point. Expect some more when once I have
test test working:
1. Use separate methods for separate tests. It makes it easier to determine
which tests are failing.
2. We aim to keep the code warning free. If you use Eclipse, checkout the
configuration settings we use under res/ide-support/eclipse
3. It looks like you should be able to re-use the existing tracking listener.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-21 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Abdessamed MANSOURI  changed:

   What|Removed |Added

  Attachment #33783|0   |1
is obsolete||

--- Comment #7 from Abdessamed MANSOURI  ---
Created attachment 33784
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33784=edit
Unit test of bug 59219

Unit test which checks point 2 and 3.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-21 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Abdessamed MANSOURI  changed:

   What|Removed |Added

  Attachment #33782|0   |1
is obsolete||

--- Comment #6 from Abdessamed MANSOURI  ---
Created attachment 33783
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33783=edit
Unit test of bug 59219

This unit test checks 2 and 3 points.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Abdessamed MANSOURI  changed:

   What|Removed |Added

 CC|lav...@hotmail.fr   |

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Abdessamed MANSOURI  changed:

   What|Removed |Added

 CC||lav...@hotmail.fr

--- Comment #5 from Abdessamed MANSOURI  ---
Created attachment 33782
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33782=edit
Unit test of bug 59219

Unit test patch of the bug 59219 (point 2).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

--- Comment #4 from Konstantin Kolinko  ---
(In reply to Mark Thomas from comment #3)
> - 6.0.x for 6.0.46 onwards

Scratch the above one.
Tomcat 6 was not affected by this fix.

AsyncListener is a feature of Servlet 3.0 API / Tomcat 7 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Mark Thomas  ---
Backports complete.
- 8.5.x for 8.5.1 onwards
- 8.0.x for 8.0.34 onwards
- 7.0.x for 7.0.70 onwards
- 6.0.x for 6.0.46 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

--- Comment #2 from Mark Thomas  ---
Point 3 is fixed as well in 9.0.x for 9.0.0.M5 onwards.

I'll look at back-porting this next.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 59219] AsyncListener#onError not called on exception during async processing

2016-04-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59219

Mark Thomas  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Mark Thomas  ---
I've made some changes in 9.0.x to address point 2. The provided test case
(thanks for that it makes life a lot easier) now passes. I want to look at
point 3 before thinking about back-porting.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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