Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ public synchronized void shutdown() {
}
}

public synchronized void purgeAllTasks() {
tasks.clear();
rpcTasks.clear();
}

/**
* This class encapsulates an object as well as a weak reference to a proxy
* that passes through calls to that object. In art form:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public void testDoNotPurgeRPCTask() throws Exception {
}
assertEquals("RPC Tasks have been purged!", RPCTaskNums, remainRPCTask);
tm.shutdown();
tm.purgeAllTasks();
}

@Test
Expand Down