You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LocalTaskLauncher does not remove intances from running map Map<String, TaskInstance> running = new ConcurrentHashMap<>(); Thus tasks created are added to the map, but not removed even cancelled. However LocalAppDeployer remove from map in cancel().
@Override
public void cancel(String id) {
TaskInstance instance = running.get(id);
if (instance != null) {
instance.cancelled = true;
if (isAlive(instance.getProcess())) {
shutdownAndWait(instance);
}
}
}
If you add running.remove(id) after shutdownAndwait it makes testSimpleCancel test case to be failed since getStatus return status as unknown when instance object is null.
Indeed this does sound like this is an issue to fix.
markpollack
changed the title
Should n't LocalTaskLauncher remove the instance from running map
LocalTaskLauncher remove the instance from running map when task exits
Mar 20, 2018
LocalTaskLauncher does not remove intances from running map Map<String, TaskInstance> running = new ConcurrentHashMap<>(); Thus tasks created are added to the map, but not removed even cancelled. However LocalAppDeployer remove from map in cancel().
If you add running.remove(id) after shutdownAndwait it makes testSimpleCancel test case to be failed since getStatus return status as unknown when instance object is null.
The text was updated successfully, but these errors were encountered: