@@ -726,17 +726,17 @@ public void publishConfirmsBackpressure() throws Exception {
726726
727727 sender = createSender ();
728728 sender .sendWithPublishConfirms (msgFlux ).subscribe (new BaseSubscriber <OutboundMessageResult >() {
729- @ Override
730- protected void hookOnSubscribe (Subscription subscription ) {
731- subscription .request (subscriberRequest );
732- }
729+ @ Override
730+ protected void hookOnSubscribe (Subscription subscription ) {
731+ subscription .request (subscriberRequest );
732+ }
733733
734- @ Override
735- protected void hookOnNext (OutboundMessageResult outboundMessageResult ) {
736- if (outboundMessageResult .getOutboundMessage () != null ) {
737- confirmedLatch .countDown ();
738- }
734+ @ Override
735+ protected void hookOnNext (OutboundMessageResult outboundMessageResult ) {
736+ if (outboundMessageResult .getOutboundMessage () != null ) {
737+ confirmedLatch .countDown ();
739738 }
739+ }
740740 });
741741
742742 assertTrue (consumedLatch .await (1 , TimeUnit .SECONDS ));
@@ -768,20 +768,21 @@ void publishConfirmsMaxInFlight() throws InterruptedException {
768768
769769 Flux <OutboundMessage > msgFlux = Flux .range (0 , nbMessages ).map (i -> {
770770 int current = inflight .incrementAndGet ();
771- if (current > maxInflight .get ())
771+ if (current > maxInflight .get ()) {
772772 maxInflight .set (current );
773+ }
773774 return new OutboundMessage ("" , queue , "" .getBytes ());
774775 });
775776
776777 sender = createSender ();
777778 sender
778- .sendWithPublishConfirms (msgFlux , new SendOptions ().maxInFlight (maxConcurrency ))
779- .subscribe (outboundMessageResult -> {
780- inflight .decrementAndGet ();
781- if (outboundMessageResult .isAck () && outboundMessageResult .getOutboundMessage () != null ) {
782- confirmedLatch .countDown ();
783- }
784- });
779+ .sendWithPublishConfirms (msgFlux , new SendOptions ().maxInFlight (maxConcurrency ))
780+ .subscribe (outboundMessageResult -> {
781+ inflight .decrementAndGet ();
782+ if (outboundMessageResult .isAck () && outboundMessageResult .getOutboundMessage () != null ) {
783+ confirmedLatch .countDown ();
784+ }
785+ });
785786
786787 assertTrue (confirmedLatch .await (1 , TimeUnit .SECONDS ));
787788 assertThat (maxInflight .get ()).isLessThanOrEqualTo (maxConcurrency );
@@ -814,7 +815,7 @@ public void publishConfirmsErrorWhilePublishing() throws Exception {
814815 sender .sendWithPublishConfirms (msgFlux , new SendOptions ().exceptionHandler ((ctx , e ) -> {
815816 throw new RabbitFluxException (e );
816817 })) // Before change: (onNext -> onError -> onNext )
817- // After change (maxInFlight): (onNext -> onError)
818+ // After change (maxInFlight): (onNext -> onError)
818819 .subscribe (outboundMessageResult -> {
819820 if (outboundMessageResult .getOutboundMessage () != null ) {
820821 confirmLatch .countDown ();
0 commit comments