diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 32f1aba3f17a5..861ef99480a5c 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -35,6 +35,8 @@ + --add-exports com.azure.core/com.azure.core.implementation.jackson=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED --add-opens com.azure.data.appconfiguration/com.azure.data.appconfiguration=ALL-UNNAMED diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java index 69335260080c9..56d0d3e694cfc 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java @@ -1133,14 +1133,13 @@ public void listRevisionsWithPagination(HttpClient httpClient, ConfigurationServ settings.add(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix)); } - List>> results = new ArrayList<>(); for (ConfigurationSetting setting : settings) { - results.add(client.setConfigurationSettingWithResponse(setting, false)); + StepVerifier.create(client.setConfigurationSetting(setting)) + .expectNextCount(1) + .verifyComplete(); } SettingSelector filter = new SettingSelector().setKeyFilter(keyPrefix).setLabelFilter(labelPrefix); - - Flux.merge(results).blockLast(); StepVerifier.create(client.listRevisions(filter)) .expectNextCount(numberExpected) .verifyComplete(); @@ -1156,17 +1155,16 @@ public void listRevisionsWithPaginationAndRepeatStream(HttpClient httpClient, Co client = getConfigurationAsyncClient(httpClient, serviceVersion); final int numberExpected = 50; List settings = new ArrayList<>(numberExpected); - List>> results = new ArrayList<>(); for (int value = 0; value < numberExpected; value++) { ConfigurationSetting setting = new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix); settings.add(setting); - results.add(client.setConfigurationSettingWithResponse(setting, false)); + StepVerifier.create(client.setConfigurationSetting(setting)) + .expectNextCount(1) + .verifyComplete(); } SettingSelector filter = new SettingSelector().setKeyFilter(keyPrefix).setLabelFilter(labelPrefix); - Flux.merge(results).blockLast(); - List configurationSettingList1 = new ArrayList<>(); List configurationSettingList2 = new ArrayList<>(); @@ -1192,7 +1190,7 @@ public void listRevisionsWithPaginationAndRepeatIterator(HttpClient httpClient, for (int value = 0; value < numberExpected; value++) { ConfigurationSetting setting = new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix); settings.add(setting); - results.add(client.setConfigurationSettingWithResponse(setting, false)); + StepVerifier.create(client.setConfigurationSetting(setting)).expectNextCount(1).verifyComplete(); } SettingSelector filter = new SettingSelector().setKeyFilter(keyPrefix).setLabelFilter(labelPrefix); diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientBuilderTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientBuilderTest.java index 5ff44fb694f2d..5c4eb51327874 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientBuilderTest.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientBuilderTest.java @@ -6,7 +6,6 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; import com.azure.core.http.policy.ExponentialBackoffOptions; import com.azure.core.http.policy.FixedDelay; import com.azure.core.http.policy.HttpLogDetailLevel; @@ -190,7 +189,7 @@ public void defaultPipeline() { () -> clientBuilder.buildClient().setConfigurationSetting(key, null, value)); } HttpClient defaultHttpClient = interceptorManager.isPlaybackMode() ? interceptorManager.getPlaybackClient() - : new NettyAsyncHttpClientBuilder().wiretap(true).build(); + : HttpClient.createDefault(); clientBuilder.pipeline(null).httpClient(defaultHttpClient); diff --git a/sdk/appconfiguration/tests.yml b/sdk/appconfiguration/tests.yml index 00a60bf76ab21..69d1357679f3a 100644 --- a/sdk/appconfiguration/tests.yml +++ b/sdk/appconfiguration/tests.yml @@ -4,6 +4,10 @@ stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: appconfiguration + Artifacts: + - name: azure-data-appconfiguration + groupId: com.azure + safeName: azuredataappconfiguration TimeoutInMinutes: 90 SupportedClouds: "Public,UsGov,China" EnvVars: