File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
google-cloud-pubsub/src/test/java/com/google/cloud/pubsub Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1818
1919import static org .junit .Assert .assertTrue ;
2020
21+ import com .google .cloud .Clock ;
2122import com .google .cloud .GrpcServiceOptions .ExecutorFactory ;
2223import com .google .common .collect .ImmutableList ;
2324import java .util .concurrent .CountDownLatch ;
2930import java .util .concurrent .atomic .AtomicLong ;
3031import org .easymock .EasyMock ;
3132import org .easymock .IAnswer ;
33+ import org .joda .time .DateTimeUtils ;
3234import org .junit .After ;
3335import org .junit .Before ;
3436import org .junit .Rule ;
35- import org .junit .Test ;
3637import org .junit .rules .Timeout ;
38+ import org .junit .Test ;
3739
3840public class AckDeadlineRenewerTest {
3941
@@ -49,7 +51,12 @@ public class AckDeadlineRenewerTest {
4951 private PubSub pubsub ;
5052 private FakeScheduledExecutorService executorService ;
5153 private AckDeadlineRenewer ackDeadlineRenewer ;
52- private final FakeClock clock = new FakeClock ();
54+ private final Clock clock = new Clock () {
55+ @ Override
56+ public long millis () {
57+ return DateTimeUtils .currentTimeMillis ();
58+ }
59+ };
5360
5461 @ Rule
5562 public Timeout globalTimeout = Timeout .seconds (60 );
You can’t perform that action at this time.
0 commit comments