You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/09/14 17:19:24 UTC

[GitHub] [geode] mhansonp commented on pull request #6858: GEODE-9365: Removing unnecessary synchronization

mhansonp commented on pull request #6858:
URL: https://github.com/apache/geode/pull/6858#issuecomment-919355674


   > I think you should retrofit the test to use `ExecutorServiceRule` (geode-junit) and `ErrorCollector` (JUnit) instead.
   > 
   > Change all the catch-blocks in threads to hand off the error to the `ErrorCollector` instead of appending to a `StringBuffer`:
   > 
   > ```
   > @Rule
   > public ErrorCollector errorCollector = new ErrorCollector();
   > ```
   > 
   >  ```
   > } catch (Exception e) {
   >   errorCollector.addError(e);
   > }
   > ```
   > 
   > And replace all the `Thread` uses with simple uses of `ExecutorServiceRule`.
   > 
   > Submitting tasks to `ExecutorServiceRule` will return futures the test can wait on (with built in use of GeodeAwaitility timeout) so you can ditch the waiting, any looping recommended by others, etc.
   
   I could use some guidance on this. I will talk to you directly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org