[SERVER-36402] ScopedThread's join() method should throw if an exception was thrown in the thread Created: 01/Aug/18  Updated: 01/Aug/18  Resolved: 01/Aug/18

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-35154 Exceptions that escape a ScopedThread... Closed
Participants:

 Description   

Almost all tests using ScopedThreads call join() on the thread, but few if any call hasFailed(). Without checking the result of hasFailed() on the thread, it's possible that an uncaught exception was thrown from the thread but the test can still pass. This may be hiding existing test failures.

If we don't do this, we should at least audit all users of ScopedThread and make sure they're handing errors from within the thread appropriately.



 Comments   
Comment by Spencer Brody (Inactive) [ 01/Aug/18 ]

There are several things on that list that I would personally consider lower priority than this. For now I'm going to close this ticket as a dupe of SERVER-35154, but I'd love to get that added to the quick wins bucket so let me know if you want my input on where it should be in the priority list.

Comment by Max Hirschhorn [ 01/Aug/18 ]

Do you have any idea how likely SERVER-35154 is to get addressed in the near future Max Hirschhorn?

spencer, I thought SERVER-35154 could be a candidate for the TIG Q3 QuickWin bucket but it didn't make it in my mental calculation. These tickets are the current list but I'll be going around to Server leads and other stakeholders individually to double check if there's thing that we'd rather have than what's in the list right now.

Comment by Spencer Brody (Inactive) [ 01/Aug/18 ]

Nope, it's exactly the same, I just forgot that existed.

If SERVER-35154 is going to sit around a while longer I might try to convert this ticket into one about auditing the existing tests and fixing the ones that aren't checking hasFailed() explicitly. Of course I'd rather we just do SERVER-35154 so that isn't necessary. Do you have any idea how likely SERVER-35154 is to get addressed in the near future max.hirschhorn?

Comment by Max Hirschhorn [ 01/Aug/18 ]

spencer, is this any different from SERVER-35154 which you had also filed?

Generated at Thu Feb 08 04:42:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.