@@ -511,9 +511,6 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception {
511
511
* <li>publish with key orderA, which should now succeed
512
512
* </ol>
513
513
*/
514
- /*
515
- Temporarily disabled due to https://github.com/googleapis/java-pubsub/issues/1861.
516
- TODO(maitrimangal): Enable once resolved.
517
514
@ Test
518
515
public void testResumePublish () throws Exception {
519
516
Publisher publisher =
@@ -575,8 +572,8 @@ public void testResumePublish() throws Exception {
575
572
testPublisherServiceImpl .addPublishResponse (
576
573
PublishResponse .newBuilder ().addMessageIds ("5" ).addMessageIds ("6" ));
577
574
578
- Assert. assertEquals("5", future5.get());
579
- Assert. assertEquals("6", future6.get());
575
+ assertEquals ("5" , future5 .get ());
576
+ assertEquals ("6" , future6 .get ());
580
577
581
578
// Resume publishing of "orderA", which should now succeed
582
579
publisher .resumePublish ("orderA" );
@@ -587,8 +584,8 @@ public void testResumePublish() throws Exception {
587
584
testPublisherServiceImpl .addPublishResponse (
588
585
PublishResponse .newBuilder ().addMessageIds ("7" ).addMessageIds ("8" ));
589
586
590
- Assert. assertEquals("7", future7.get());
591
- Assert. assertEquals("8", future8.get());
587
+ assertEquals ("7" , future7 .get ());
588
+ assertEquals ("8" , future8 .get ());
592
589
593
590
shutdownTestPublisher (publisher );
594
591
}
@@ -633,6 +630,7 @@ public void testPublishThrowExceptionForUnsubmittedOrderingKeyMessage() throws E
633
630
} catch (ExecutionException e ) {
634
631
assertEquals (SequentialExecutorService .CallbackExecutor .CANCELLATION_EXCEPTION , e .getCause ());
635
632
}
633
+ fakeExecutor .advanceTime (Duration .ZERO );
636
634
637
635
// A subsequent attempt fails immediately.
638
636
ApiFuture <String > publishFuture4 = sendTestMessageWithOrderingKey (publisher , "D" , "a" );
@@ -643,7 +641,6 @@ public void testPublishThrowExceptionForUnsubmittedOrderingKeyMessage() throws E
643
641
assertEquals (SequentialExecutorService .CallbackExecutor .CANCELLATION_EXCEPTION , e .getCause ());
644
642
}
645
643
}
646
- */
647
644
648
645
private ApiFuture <String > sendTestMessageWithOrderingKey (
649
646
Publisher publisher , String data , String orderingKey ) {
0 commit comments