Skip to content

Commit 2451a8a

Browse files
committed
codacy
1 parent 5bdaf98 commit 2451a8a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/spi/v1/SubscriberImplTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ public class SubscriberImplTest {
6969

7070
private static final int INITIAL_ACK_DEADLINE_EXTENSION_SECS = 2;
7171

72-
@Parameters
73-
public static Collection<Object[]> data() {
74-
return Arrays.asList(new Object[][] {{false}});
75-
}
76-
7772
private final boolean isStreamingTest;
7873

7974
private ManagedChannel testChannel;
@@ -83,18 +78,23 @@ public static Collection<Object[]> data() {
8378

8479
private TestReceiver testReceiver;
8580

81+
@Parameters
82+
public static Collection<Object[]> data() {
83+
return Arrays.asList(new Object[][] {{false}});
84+
}
85+
8686
static class TestReceiver implements MessageReceiver {
8787
private final LinkedBlockingQueue<AckReplyConsumer> outstandingMessageReplies =
8888
new LinkedBlockingQueue<>();
89-
private boolean shouldAck = true; // If false, the receiver will <b>nack</b> the messages
89+
private boolean shouldAck = true; // If false, the receiver will <b>nack</b> the messages
9090
private Optional<CountDownLatch> messageCountLatch = Optional.absent();
9191
private Optional<RuntimeException> error = Optional.absent();
9292
private boolean explicitAckReplies;
9393

9494
void setAckReply() {
9595
this.shouldAck = true;
9696
}
97-
97+
9898
void setNackReply() {
9999
this.shouldAck = false;
100100
}
@@ -293,10 +293,10 @@ public void testModifyAckDeadline() throws Exception {
293293
List<String> testAckIdsBatch = ImmutableList.of("A", "B", "C");
294294
testReceiver.setExplicitAck(true);
295295
// A modify ack deadline should be scheduled for the next 9s
296-
fakeExecutor.setupScheduleExpectation(Duration.standardSeconds(9));
296+
fakeExecutor.setupScheduleExpectation(Duration.standardSeconds(9));
297297
sendMessages(testAckIdsBatch);
298298
// To ensure first modify ack deadline got scheduled
299-
fakeExecutor.waitForExpectedWork();
299+
fakeExecutor.waitForExpectedWork();
300300

301301
fakeExecutor.advanceTime(Duration.standardSeconds(9));
302302

@@ -343,10 +343,10 @@ public void testModifyAckDeadline_defaultMaxExtensionPeriod() throws Exception {
343343
List<String> testAckIdsBatch = ImmutableList.of("A", "B", "C");
344344
testReceiver.setExplicitAck(true);
345345
// A modify ack deadline should be schedule for the next 9s
346-
fakeExecutor.setupScheduleExpectation(Duration.standardSeconds(9));
346+
fakeExecutor.setupScheduleExpectation(Duration.standardSeconds(9));
347347
sendMessages(testAckIdsBatch);
348348
// To ensure the first modify ack deadlines got scheduled
349-
fakeExecutor.waitForExpectedWork();
349+
fakeExecutor.waitForExpectedWork();
350350

351351
// Next modify ack deadline should be schedule in the next 1s
352352
fakeExecutor.advanceTime(Duration.standardSeconds(9));

0 commit comments

Comments
 (0)