Skip to content

Commit

Permalink
handle flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhee17 committed Aug 9, 2024
1 parent 610f83d commit cc8db83
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
import com.linecorp.armeria.common.annotation.Nullable;
import com.linecorp.armeria.common.logging.RequestLogAccess;
import com.linecorp.armeria.common.stream.SubscriptionOption;
import com.linecorp.armeria.common.util.SafeCloseable;
import com.linecorp.armeria.internal.common.RequestContextUtil;
import com.linecorp.armeria.internal.testing.MockAddressResolverGroup;
import com.linecorp.armeria.server.ServerBuilder;
import com.linecorp.armeria.testing.junit5.common.EventLoopGroupExtension;
Expand Down Expand Up @@ -245,7 +247,9 @@ void cancel_beforeWriteFinished(TestInfo testInfo) {
public void subscribe(Subscriber<? super HttpObject> subscriber, EventExecutor executor,
SubscriptionOption... options) {
super.subscribe(subscriber, executor, options);
ctxRef.get().cancel(t);
try (SafeCloseable ignored = RequestContextUtil.pop()) {
ctxRef.get().cancel(t);
}
}
});
assertThatThrownBy(() -> res.aggregate().join())
Expand Down

0 comments on commit cc8db83

Please sign in to comment.