mirror of
https://github.com/google/nomulus
synced 2026-07-31 04:22:47 +00:00
Enable new errorprone checks and fix violations (#3018)
This commit is contained in:
@@ -150,8 +150,8 @@ public final class TestUtils {
|
||||
private static void assertHttpMessageEquivalent(HttpMessage msg1, HttpMessage msg2) {
|
||||
assertThat(msg1.protocolVersion()).isEqualTo(msg2.protocolVersion());
|
||||
assertThat(msg1.headers()).isEqualTo(msg2.headers());
|
||||
if (msg1 instanceof FullHttpRequest && msg2 instanceof FullHttpRequest) {
|
||||
assertThat(((FullHttpRequest) msg1).content()).isEqualTo(((FullHttpRequest) msg2).content());
|
||||
if (msg1 instanceof FullHttpRequest req1 && msg2 instanceof FullHttpRequest req2) {
|
||||
assertThat(req1.content()).isEqualTo(req2.content());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -302,8 +302,7 @@ class TokenStoreTest {
|
||||
// Verify that a task is scheduled.
|
||||
ArgumentCaptor<Runnable> argument = ArgumentCaptor.forClass(Runnable.class);
|
||||
verify(refreshExecutor)
|
||||
.scheduleWithFixedDelay(
|
||||
argument.capture(), eq((long) 5), eq((long) 5), eq(TimeUnit.SECONDS));
|
||||
.scheduleWithFixedDelay(argument.capture(), eq(5L), eq(5L), eq(TimeUnit.SECONDS));
|
||||
|
||||
// Verify that the scheduled task calls TokenStore.refresh().
|
||||
argument.getValue().run();
|
||||
|
||||
Reference in New Issue
Block a user