Skip to content

GEODE-6301: Use ThreadInfo.toString in ExecutorServiceRule.dumpThreads#3123

Merged
kirklund merged 1 commit intoapache:developfrom
kirklund:GEODE-6301-ExecutorServiceRule-format-dumpThreads
Feb 4, 2019
Merged

GEODE-6301: Use ThreadInfo.toString in ExecutorServiceRule.dumpThreads#3123
kirklund merged 1 commit intoapache:developfrom
kirklund:GEODE-6301-ExecutorServiceRule-format-dumpThreads

Conversation

@kirklund
Copy link
Contributor

ThreadInfo.toString contains all of the relevant monitor/synchronizer lock info that ExecutorServiceRule.dumpThreads needs so I removed customization of the dump and just use what ThreadInfo provides.

Cleanup javadocs and warnings in all ExecutorServiceRule tests.
@kirklund kirklund force-pushed the GEODE-6301-ExecutorServiceRule-format-dumpThreads branch from 6d9ff5d to e850f57 Compare January 25, 2019 20:58
@kirklund kirklund requested a review from bschuchardt January 25, 2019 21:00
@demery-pivotal
Copy link
Contributor

Wow! Those tests look very helpful!


assertThat(dump)
.contains("Number of locked synchronizers = 2")
.contains(sync.getClass().getName() + "$NonfairSync@");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something in this test that requires it to be a non-fair sync? If so, I'd like the test to indicate more clearly why it's non-fair. If this inner class name is just an implementation detail, consider ignoring the inner class name by comparing via regex.

Similar for other comparisons involving inner class names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I merged to develop before refreshing the page. I'll file another PR with removal of hard-coded inner-classes from the assertions. The only reason it's there is to assert that the class is in the thread stack.

@kirklund kirklund merged commit 1daef02 into apache:develop Feb 4, 2019
@kirklund kirklund deleted the GEODE-6301-ExecutorServiceRule-format-dumpThreads branch October 18, 2019 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants