Skip to content

Commit f09297d

Browse files
authored
Disable nondeterministic IT (kroxylicious#3048)
Our dream was that we could guarantee that chained work is executed on the filter dispatch executor. However in the empty case we complete extremely quickly so there is a possibility that work chained on to filterContext.topicNames(xyz) will execute in the calling thread, not the filter dispatch thread. We need to decide if we take things further, like implementing our own CompletionStage with a different execution guarantee than CompletableFuture. Or we could rely on javadoc to let developers know that if they call topicNames from an uncontrolled thread, they will need to switch back to the filterDispatchExecutor to mutate filter members safely using a then*Async method of the CompletionStage. Signed-off-by: Robert Young <[email protected]>
1 parent 5cf5851 commit f09297d

File tree

1 file changed

+2
-0
lines changed
  • kroxylicious-integration-tests/src/test/java/io/kroxylicious/proxy

1 file changed

+2
-0
lines changed

kroxylicious-integration-tests/src/test/java/io/kroxylicious/proxy/FilterIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.apache.kafka.common.protocol.Errors;
3838
import org.apache.kafka.common.protocol.types.RawTaggedField;
3939
import org.apache.kafka.common.serialization.Serdes;
40+
import org.junit.jupiter.api.Disabled;
4041
import org.junit.jupiter.api.Test;
4142
import org.junit.jupiter.api.extension.ExtendWith;
4243
import org.junit.jupiter.params.ParameterizedTest;
@@ -130,6 +131,7 @@ void filtersCanLookUpEmptyTopicNames(KafkaCluster cluster) {
130131
}
131132
}
132133

134+
@Disabled("this test is non-deterministic, due to the nature of CompletableFuture, it is possible for the calling thread to execute the chained work")
133135
@Test
134136
void filtersCanLookUpEmptyTopicNamesInitiatedFromNonFilterDispatchThread(KafkaCluster cluster) {
135137
NamedFilterDefinition namedFilterDefinition = new NamedFilterDefinitionBuilder(TOPIC_ID_LOOKUP_FILTER_NAME,

0 commit comments

Comments
 (0)