jiajunwang commented on a change in pull request #1140:
URL: https://github.com/apache/helix/pull/1140#discussion_r451038906
##########
File path:
helix-core/src/test/java/org/apache/helix/task/TaskSynchronizedTestBase.java
##########
@@ -181,12 +186,22 @@ protected void stopParticipants() {
protected void stopParticipant(int i) {
if (_participants.length <= i) {
- throw new HelixException(
- String.format("Can't stop participant %s, only %s participants" +
"were set up.", i,
+ throw new HelixException(String
+ .format("Can't stop participant %s, only %s participants" + "were
set up.", i,
_participants.length));
}
- if (_participants[i] != null && _participants[i].isConnected()) {
- _participants[i].syncStop();
+ if (_participants[i] != null) {
+ if (_participants[i].isConnected()) {
+ _participants[i].syncStop();
+ }
+ // Shutdown the state model factories to close all threads.
+ StateMachineEngine stateMachine =
_participants[i].getStateMachineEngine();
+ if (stateMachine != null) {
+ StateModelFactory stateModelFactory =
stateMachine.getStateModelFactory("Task");
Review comment:
good point. Fixed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]