Skip to content

Commit 9238a9d

Browse files
committed
xds: Run integration test with both values of RFC 3986 URI flag
1 parent 7076654 commit 9238a9d

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

xds/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ java_library(
343343
":xds",
344344
":xds_java_proto",
345345
"//api",
346+
"//api:test_fixtures",
346347
"//core:internal",
347348
"//stub",
348349
"//testing-proto:simpleservice_java_grpc",

xds/src/test/java/io/grpc/xds/FakeControlPlaneXdsIntegrationTest.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@
5050
import io.grpc.ClientCall;
5151
import io.grpc.ClientInterceptor;
5252
import io.grpc.ClientStreamTracer;
53+
import io.grpc.FlagResetRule;
5354
import io.grpc.ForwardingClientCall.SimpleForwardingClientCall;
5455
import io.grpc.ForwardingClientCallListener;
56+
import io.grpc.InternalFeatureFlags;
5557
import io.grpc.LoadBalancerRegistry;
5658
import io.grpc.ManagedChannel;
5759
import io.grpc.Metadata;
@@ -60,10 +62,14 @@
6062
import io.grpc.testing.protobuf.SimpleResponse;
6163
import io.grpc.testing.protobuf.SimpleServiceGrpc;
6264
import java.net.InetSocketAddress;
65+
import java.util.Arrays;
66+
import org.junit.Before;
6367
import org.junit.Rule;
6468
import org.junit.Test;
6569
import org.junit.runner.RunWith;
66-
import org.junit.runners.JUnit4;
70+
import org.junit.runners.Parameterized;
71+
import org.junit.runners.Parameterized.Parameter;
72+
import org.junit.runners.Parameterized.Parameters;
6773

6874
/**
6975
* Xds integration tests using a local control plane, implemented in {@link
@@ -85,13 +91,28 @@
8591
* 3) Construct EDS config w/ test server address from 2). Set CDS and EDS Config at the Control
8692
* Plane. Then start the test xDS client (requires EDS to do xDS name resolution).
8793
*/
88-
@RunWith(JUnit4.class)
94+
@RunWith(Parameterized.class)
8995
public class FakeControlPlaneXdsIntegrationTest {
9096

9197
@Rule(order = 0)
9298
public ControlPlaneRule controlPlane = new ControlPlaneRule();
9399
@Rule(order = 1)
94100
public DataPlaneRule dataPlane = new DataPlaneRule(controlPlane);
101+
@Rule(order = 2)
102+
public final FlagResetRule flagResetRule = new FlagResetRule();
103+
104+
@Parameters(name = "enableRfc3986UrisParam={0}")
105+
public static Iterable<Object[]> data() {
106+
return Arrays.asList(new Object[][] {{true}, {false}});
107+
}
108+
109+
@Parameter public boolean enableRfc3986UrisParam;
110+
111+
@Before
112+
public void setupRfc3986UrisFeatureFlag() throws Exception {
113+
flagResetRule.setFlagForTest(
114+
InternalFeatureFlags::setRfc3986UrisEnabled, enableRfc3986UrisParam);
115+
}
95116

96117
@Test
97118
public void pingPong() throws Exception {

0 commit comments

Comments
 (0)