Skip to content

Commit

Permalink
[AppConfig] Add back the appconfig artifacts in tests.yml (Azure#33665)
Browse files Browse the repository at this point in the history
  • Loading branch information
mssfang committed Apr 17, 2023
1 parent 7deef6e commit b3ce6f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 2 additions & 0 deletions sdk/appconfiguration/azure-data-appconfiguration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
<properties>
<!-- Configures the Java 9+ run to perform the required module exports, opens, and reads that are necessary for testing but shouldn't be part of the module-info. -->
<javaModulesSurefireArgLine>
--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
</javaModulesSurefireArgLine>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,14 +1133,13 @@ public void listRevisionsWithPagination(HttpClient httpClient, ConfigurationServ
settings.add(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix));
}

List<Mono<Response<ConfigurationSetting>>> 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();
Expand All @@ -1156,17 +1155,16 @@ public void listRevisionsWithPaginationAndRepeatStream(HttpClient httpClient, Co
client = getConfigurationAsyncClient(httpClient, serviceVersion);
final int numberExpected = 50;
List<ConfigurationSetting> settings = new ArrayList<>(numberExpected);
List<Mono<Response<ConfigurationSetting>>> 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<ConfigurationSetting> configurationSettingList1 = new ArrayList<>();
List<ConfigurationSetting> configurationSettingList2 = new ArrayList<>();

Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit b3ce6f2

Please sign in to comment.