Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientEffectiveStrategyTest: Attempt at fixing flakyness #2804

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Objects;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingQueue;
Expand Down Expand Up @@ -478,9 +480,10 @@ private static Buffer content(HttpExecutionContext ctx) {

private static final class ClientInvokingThreadRecorder implements StreamingHttpClientFilterFactory {

private Thread applicationThread = Thread.currentThread();
private HttpExecutionStrategy expectedStrategy;
private final EnumSet<ClientOffloadPoint> offloadPoints = EnumSet.noneOf(ClientOffloadPoint.class);
private volatile Thread applicationThread = Thread.currentThread();
private volatile HttpExecutionStrategy expectedStrategy;
private final Set<ClientOffloadPoint> offloadPoints =
Collections.synchronizedSet(EnumSet.noneOf(ClientOffloadPoint.class));
private final ConcurrentMap<ClientOffloadPoint, String> invokingThreads = new ConcurrentHashMap<>();
private final Queue<Throwable> errors = new LinkedBlockingQueue<>();

Expand Down
Loading