14package org.dartlang.vm.service;
16import java.util.concurrent.CountDownLatch;
17import java.util.concurrent.TimeUnit;
26 final CountDownLatch
latch =
new CountDownLatch(1);
34 endTime = System.currentTimeMillis() + 5000;
51 System.out.println(
">>> No response received");
52 throw new RuntimeException(
"No response received");
65 long waitTimeMillis = endTime - System.currentTimeMillis();
66 if (waitTimeMillis <= 0) {
67 return latch.getCount() == 0;
70 if (
latch.await(waitTimeMillis, TimeUnit.MILLISECONDS)) {
73 }
catch (InterruptedException
e) {
void waitAndAssertOpComplete()
final CountDownLatch latch