Lines Matching defs:expected
35 // wait for the thread to transition to the expected state
44 public static boolean waitForThreadState(Thread t, Thread.State expected) {
45 // wait for the thread to transition to the expected state
47 while (t.getState() != expected && retryCount < MAX_RETRY) {
51 return (t.getState() == expected);
54 public static void checkThreadState(Thread t, Thread.State expected) {
55 waitForThreadState(t, expected);
59 throw new RuntimeException(t.getName() + " expected to have " +
60 expected + " but got null.");
62 if (state != expected) {
65 " expected to have " + expected + " but got " + state);