Skip to content

Commit 88c6956

Browse files
committed
feat: rpc add accept header
1 parent 1398a27 commit 88c6956

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

capa-spi-aws-config/src/test/java/group/rxcloud/capa/spi/aws/config/AwsCapaConfigStoreTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public void setUp() {
6666
Whitebox.setInternalState(ins, "appConfigAsyncClient", client);
6767
PowerMockito.when(client.getConfiguration(ArgumentMatchers.any(GetConfigurationRequest.class))).thenReturn(mockGetConfigurationRespV1());
6868

69-
7069
SerializerProcessor serializerProcessor = PowerMockito.mock(SerializerProcessor.class);
7170
Whitebox.setInternalState(ins, "serializerProcessor", serializerProcessor);
7271
User user = new User();

capa-spi-aws-mesh/src/test/java/group/rxcloud/capa/spi/aws/mesh/env/AwsRpcEnvironmentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public void testGetSerializer_SuccessWhenDefault() {
3737
@Test
3838
public void testGetNamespace_SuccessWhenDefault() {
3939
String namespace = AwsCapaRpcProperties.AppMeshProperties.Settings.getRpcAwsAppMeshNamespace();
40-
Assertions.assertNotNull(namespace);
40+
Assertions.assertNull(namespace);
4141
}
4242
}

capa-spi-aws-mesh/src/test/java/group/rxcloud/capa/spi/aws/mesh/http/AwsCapaHttpTest.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,21 @@ public void setUp() {
5050
@Test
5151
public void testInvokeSpiApi_Success() {
5252
AwsSpiOptionsLoader awsSpiOptionsLoader = new AwsSpiOptionsLoader();
53-
AwsRpcServiceOptions awsRpcServiceOptions = awsSpiOptionsLoader.loadRpcServiceOptions("appId");
5453

55-
CompletableFuture<HttpResponse<String>> responseCompletableFuture = awsCapaHttp.invokeSpiApi("appId",
56-
"method",
57-
"requestData",
58-
"POST",
59-
new HashMap<>(),
60-
new HashMap<>(),
61-
TypeRef.STRING,
62-
awsRpcServiceOptions);
54+
Assertions.assertThrows(NullPointerException.class, () -> {
55+
AwsRpcServiceOptions awsRpcServiceOptions = awsSpiOptionsLoader.loadRpcServiceOptions("appId");
6356

64-
responseCompletableFuture.cancel(true);
57+
CompletableFuture<HttpResponse<String>> responseCompletableFuture = awsCapaHttp.invokeSpiApi("appId",
58+
"method",
59+
"requestData",
60+
"POST",
61+
new HashMap<>(),
62+
new HashMap<>(),
63+
TypeRef.STRING,
64+
awsRpcServiceOptions);
65+
66+
responseCompletableFuture.cancel(true);
67+
});
6568
}
6669

6770
@Test

capa-spi-aws-mesh/src/test/java/group/rxcloud/capa/spi/aws/mesh/http/config/AwsSpiOptionsLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void testLoadRpcServiceOptions_Success() {
3535

3636
Assertions.assertEquals("appId", awsToAwsServiceOptions.getServiceId());
3737
Assertions.assertEquals(8080, awsToAwsServiceOptions.getServicePort());
38-
Assertions.assertNotNull(awsToAwsServiceOptions.getNamespace());
3938
Assertions.assertNotNull(awsToAwsServiceOptions.getServiceEnv());
39+
Assertions.assertNull(awsToAwsServiceOptions.getNamespace());
4040
}
4141
}

0 commit comments

Comments
 (0)