|
50 | 50 | import io.grpc.ClientCall; |
51 | 51 | import io.grpc.ClientInterceptor; |
52 | 52 | import io.grpc.ClientStreamTracer; |
| 53 | +import io.grpc.FlagResetRule; |
53 | 54 | import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; |
54 | 55 | import io.grpc.ForwardingClientCallListener; |
| 56 | +import io.grpc.InternalFeatureFlags; |
55 | 57 | import io.grpc.LoadBalancerRegistry; |
56 | 58 | import io.grpc.ManagedChannel; |
57 | 59 | import io.grpc.Metadata; |
|
60 | 62 | import io.grpc.testing.protobuf.SimpleResponse; |
61 | 63 | import io.grpc.testing.protobuf.SimpleServiceGrpc; |
62 | 64 | import java.net.InetSocketAddress; |
| 65 | +import java.util.Arrays; |
| 66 | +import org.junit.Before; |
63 | 67 | import org.junit.Rule; |
64 | 68 | import org.junit.Test; |
65 | 69 | 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; |
67 | 73 |
|
68 | 74 | /** |
69 | 75 | * Xds integration tests using a local control plane, implemented in {@link |
|
85 | 91 | * 3) Construct EDS config w/ test server address from 2). Set CDS and EDS Config at the Control |
86 | 92 | * Plane. Then start the test xDS client (requires EDS to do xDS name resolution). |
87 | 93 | */ |
88 | | -@RunWith(JUnit4.class) |
| 94 | +@RunWith(Parameterized.class) |
89 | 95 | public class FakeControlPlaneXdsIntegrationTest { |
90 | 96 |
|
91 | 97 | @Rule(order = 0) |
92 | 98 | public ControlPlaneRule controlPlane = new ControlPlaneRule(); |
93 | 99 | @Rule(order = 1) |
94 | 100 | 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 | + } |
95 | 116 |
|
96 | 117 | @Test |
97 | 118 | public void pingPong() throws Exception { |
|
0 commit comments