Skip to content

Commit

Permalink
add comment for test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jschneider committed Feb 3, 2017
1 parent 6acef0d commit 05d5986
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,16 @@ public void run() {
assertEquals(0, calls[0]);
}

/**
* Regression test to ensure there is no NPE when the worker has been disposed
*/
@Test
public void npe() throws Exception {
Scheduler s = getScheduler();
NewThreadWorker w = (NewThreadWorker) s.createWorker();
w.dispose();

//This method used to throw a NPE when the worker has been disposed and the parent is null
w.scheduleActual(new Runnable() {
@Override
public void run() {
Expand Down

0 comments on commit 05d5986

Please sign in to comment.