Skip to content

Commit

Permalink
make AckDeadlineRenewerTest pass
Browse files Browse the repository at this point in the history
  • Loading branch information
pongad committed Dec 12, 2016
1 parent fb6c5ae commit a409eac
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static org.junit.Assert.assertTrue;

import com.google.cloud.Clock;
import com.google.cloud.GrpcServiceOptions.ExecutorFactory;
import com.google.common.collect.ImmutableList;
import java.util.concurrent.CountDownLatch;
Expand All @@ -29,11 +30,12 @@
import java.util.concurrent.atomic.AtomicLong;
import org.easymock.EasyMock;
import org.easymock.IAnswer;
import org.joda.time.DateTimeUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import org.junit.Test;

public class AckDeadlineRenewerTest {

Expand All @@ -49,7 +51,12 @@ public class AckDeadlineRenewerTest {
private PubSub pubsub;
private FakeScheduledExecutorService executorService;
private AckDeadlineRenewer ackDeadlineRenewer;
private final FakeClock clock = new FakeClock();
private final Clock clock = new Clock() {
@Override
public long millis() {
return DateTimeUtils.currentTimeMillis();
}
};

@Rule
public Timeout globalTimeout = Timeout.seconds(60);
Expand Down

0 comments on commit a409eac

Please sign in to comment.