|
27 | 27 | import com.github.xds.type.matcher.v3.StringMatcher; |
28 | 28 | import com.google.protobuf.Any; |
29 | 29 | import io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig; |
30 | | -import io.grpc.xds.Filter.FilterConfigParseContext; |
31 | | -import io.grpc.xds.client.Bootstrapper.BootstrapInfo; |
32 | | -import io.grpc.xds.client.Bootstrapper.ServerInfo; |
33 | | -import io.envoyproxy.envoy.config.core.v3.Node; |
34 | | -import java.util.Collections; |
35 | 30 | import io.envoyproxy.envoy.extensions.common.matching.v3.ExtensionWithMatcher; |
36 | 31 | import io.envoyproxy.envoy.extensions.common.matching.v3.ExtensionWithMatcherPerRoute; |
37 | 32 | import io.envoyproxy.envoy.extensions.filters.http.composite.v3.Composite; |
|
49 | 44 | import io.grpc.ServerInterceptor; |
50 | 45 | import io.grpc.Status; |
51 | 46 | import io.grpc.xds.Filter.FilterConfig; |
| 47 | +import io.grpc.xds.client.Bootstrapper.BootstrapInfo; |
| 48 | +import io.grpc.xds.client.Bootstrapper.ServerInfo; |
52 | 49 | import io.grpc.xds.internal.UnifiedMatcher; |
53 | 50 | import java.net.InetSocketAddress; |
54 | 51 | import java.net.SocketAddress; |
@@ -93,7 +90,10 @@ public void setUp() { |
93 | 90 |
|
94 | 91 | when(fakeProvider.typeUrls()).thenReturn(new String[]{FAKE_TYPE_URL}); |
95 | 92 | ConfigOrError<? extends FilterConfig> configRes = ConfigOrError.fromConfig(fakeConfig); |
96 | | - when(fakeProvider.parseFilterConfig(any(Any.class), any(Filter.FilterConfigParseContext.class), org.mockito.ArgumentMatchers.anyInt())) |
| 93 | + when(fakeProvider.parseFilterConfig( |
| 94 | + any(Any.class), |
| 95 | + any(Filter.FilterConfigParseContext.class), |
| 96 | + org.mockito.ArgumentMatchers.anyInt())) |
97 | 97 | .thenReturn((ConfigOrError) configRes); |
98 | 98 | when(fakeProvider.newInstance(any(String.class))).thenReturn(fakeFilter); |
99 | 99 | when(fakeFilter.buildClientInterceptor(any(), any(), any())).thenReturn(fakeClientInterceptor); |
@@ -1028,7 +1028,8 @@ public void parseFilterConfigExceedsRecursionLimit() { |
1028 | 1028 | final Any configAny = Any.pack(configProto); |
1029 | 1029 |
|
1030 | 1030 | // Mock fakeProvider to call provider.parseFilterConfig recursively |
1031 | | - when(fakeProvider.parseFilterConfig(any(), any(Filter.FilterConfigParseContext.class), org.mockito.ArgumentMatchers.anyInt())) |
| 1031 | + when(fakeProvider.parseFilterConfig( |
| 1032 | + any(), any(Filter.FilterConfigParseContext.class), org.mockito.ArgumentMatchers.anyInt())) |
1032 | 1033 | .thenAnswer(new org.mockito.stubbing.Answer<ConfigOrError>() { |
1033 | 1034 | @Override |
1034 | 1035 | public ConfigOrError answer( |
@@ -1233,7 +1234,8 @@ public void parseFilterConfigInvalidMessageType() { |
1233 | 1234 | @Test |
1234 | 1235 | public void parseFilterConfigOverrideInvalidMessageType() { |
1235 | 1236 | ConfigOrError<CompositeFilter.CompositeFilterConfig> result = provider |
1236 | | - .parseFilterConfigOverride(com.google.protobuf.Empty.getDefaultInstance(), getFilterContext(), 0); |
| 1237 | + .parseFilterConfigOverride( |
| 1238 | + com.google.protobuf.Empty.getDefaultInstance(), getFilterContext(), 0); |
1237 | 1239 |
|
1238 | 1240 | assertThat(result.errorDetail).contains("Invalid message type"); |
1239 | 1241 | } |
|
0 commit comments