Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/perf-test-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<includes combine.children="append">
<!-- Special allowance for performance libraries as they aren't shipped. -->
<include>com.beust:jcommander:[1.82]</include> <!-- {x-include-update;com.beust:jcommander;external_dependency} -->
<include>io.vertx:vertx-codegen:[4.5.23]</include> <!-- {x-include-update;io.vertx:vertx-codegen;external_dependency} -->
<include>io.projectreactor:reactor-core:[3.7.14]</include> <!-- {x-include-update;io.projectreactor:reactor-core;external_dependency} -->
<include>io.vertx:vertx-codegen:[4.5.26]</include> <!-- {x-include-update;io.vertx:vertx-codegen;external_dependency} -->
<include>io.projectreactor:reactor-core:[3.7.17]</include> <!-- {x-include-update;io.projectreactor:reactor-core;external_dependency} -->
</includes>
</bannedDependencies>
</rules>
Expand Down Expand Up @@ -94,7 +94,7 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen</artifactId>
<version>4.5.23</version> <!-- {x-version-update;io.vertx:vertx-codegen;external_dependency} -->
<version>4.5.26</version> <!-- {x-version-update;io.vertx:vertx-codegen;external_dependency} -->
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion eng/bomgenerator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.18.4</version> <!-- {x-version-update;com.fasterxml.jackson.dataformat:jackson-dataformat-xml;external_dependency} -->
<version>2.18.6</version> <!-- {x-version-update;com.fasterxml.jackson.dataformat:jackson-dataformat-xml;external_dependency} -->
</dependency>
</dependencies>
<build>
Expand Down
58 changes: 29 additions & 29 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ ch.qos.logback:logback-classic;1.3.14
com.azure:azure-servicebus-jms;2.1.0
com.azure.tools:azure-autorest-customization;1.0.0-beta.11
com.fasterxml:aalto-xml;1.3.3
com.fasterxml.jackson.core:jackson-annotations;2.18.4
com.fasterxml.jackson.core:jackson-core;2.18.4.1
com.fasterxml.jackson.core:jackson-databind;2.18.4
com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.18.4
com.fasterxml.jackson.dataformat:jackson-dataformat-smile;2.18.4
com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.18.4
com.fasterxml.jackson.module:jackson-module-afterburner;2.18.4
com.fasterxml.jackson.module:jackson-module-blackbird;2.18.4
com.fasterxml.jackson.module:jackson-module-scala_2.12;2.18.4
com.fasterxml.jackson.module:jackson-module-scala_2.13;2.18.4
com.fasterxml.jackson.core:jackson-annotations;2.18.6
com.fasterxml.jackson.core:jackson-core;2.18.6
com.fasterxml.jackson.core:jackson-databind;2.18.6
com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.18.6
com.fasterxml.jackson.dataformat:jackson-dataformat-smile;2.18.6
com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.18.6
com.fasterxml.jackson.module:jackson-module-afterburner;2.18.6
com.fasterxml.jackson.module:jackson-module-blackbird;2.18.6
com.fasterxml.jackson.module:jackson-module-scala_2.12;2.18.6
com.fasterxml.jackson.module:jackson-module-scala_2.13;2.18.6
com.github.spotbugs:spotbugs;4.8.3
com.github.spotbugs:spotbugs-annotations;4.8.3
com.github.spotbugs:spotbugs-maven-plugin;4.8.3.1
Expand All @@ -43,24 +43,24 @@ commons-net:commons-net;3.9.0
io.cloudevents:cloudevents-api;2.2.0
io.cloudevents:cloudevents-core;2.2.0
io.fabric8:kubernetes-client;6.12.1
io.netty:netty-buffer;4.1.130.Final
io.netty:netty-common;4.1.130.Final
io.netty:netty-codec;4.1.130.Final
io.netty:netty-codec-http;4.1.130.Final
io.netty:netty-codec-http2;4.1.130.Final
io.netty:netty-handler;4.1.130.Final
io.netty:netty-handler-proxy;4.1.130.Final
io.netty:netty-resolver;4.1.130.Final
io.netty:netty-resolver-dns;4.1.130.Final
io.netty:netty-tcnative-boringssl-static;2.0.74.Final
io.netty:netty-transport;4.1.130.Final
io.netty:netty-transport-native-epoll;4.1.130.Final
io.netty:netty-transport-native-unix-common;4.1.130.Final
io.netty:netty-transport-native-kqueue;4.1.130.Final
io.projectreactor.netty:reactor-netty-http;1.2.13
io.projectreactor:reactor-core;3.7.14
io.vertx:vertx-codegen;4.5.23
io.vertx:vertx-core;4.5.23
io.netty:netty-buffer;4.1.132.Final
io.netty:netty-common;4.1.132.Final
io.netty:netty-codec;4.1.132.Final
io.netty:netty-codec-http;4.1.132.Final
io.netty:netty-codec-http2;4.1.132.Final
io.netty:netty-handler;4.1.132.Final
io.netty:netty-handler-proxy;4.1.132.Final
io.netty:netty-resolver;4.1.132.Final
io.netty:netty-resolver-dns;4.1.132.Final
io.netty:netty-tcnative-boringssl-static;2.0.75.Final
io.netty:netty-transport;4.1.132.Final
io.netty:netty-transport-native-epoll;4.1.132.Final
io.netty:netty-transport-native-unix-common;4.1.132.Final
io.netty:netty-transport-native-kqueue;4.1.132.Final
io.projectreactor.netty:reactor-netty-http;1.2.16
io.projectreactor:reactor-core;3.7.17
io.vertx:vertx-codegen;4.5.26
io.vertx:vertx-core;4.5.26
javax.websocket:javax.websocket-api;1.1
org.apache.ant:ant;1.10.15
org.apache.avro:avro;1.11.4
Expand Down Expand Up @@ -124,7 +124,7 @@ io.opentelemetry:opentelemetry-bom;1.58.0
io.opentelemetry.instrumentation:opentelemetry-runtime-telemetry-java8;2.24.0-alpha
io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter;2.24.0
io.opentelemetry.instrumentation:opentelemetry-logback-appender-1.0;2.24.0-alpha
io.projectreactor:reactor-test;3.7.11
io.projectreactor:reactor-test;3.7.17
io.github.hakky54:logcaptor;2.9.3
com.squareup.okio:okio;3.16.0
com.squareup.okio:okio-jvm;3.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
import com.azure.compute.batch.models.BatchPoolCreateParameters;
import com.azure.compute.batch.models.BatchTask;
import com.azure.compute.batch.models.BatchTaskState;
import com.azure.compute.batch.models.ElevationLevel;
import com.azure.compute.batch.models.BatchTasksListOptions;
import com.azure.compute.batch.models.BatchVmImageReference;
import com.azure.compute.batch.models.ElevationLevel;
import com.azure.compute.batch.models.NetworkConfiguration;
import com.azure.compute.batch.models.UserAccount;
import com.azure.compute.batch.models.VirtualMachineConfiguration;
import com.azure.core.credential.AccessToken;
import com.azure.core.credential.AzureNamedKeyCredential;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.policy.HttpLogDetailLevel;
Expand All @@ -30,6 +29,7 @@
import com.azure.core.test.models.TestProxyRequestMatcher;
import com.azure.core.test.models.TestProxySanitizer;
import com.azure.core.test.models.TestProxySanitizerType;
import com.azure.core.test.utils.MockTokenCredential;
import com.azure.core.util.Configuration;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.resourcemanager.network.NetworkManager;
Expand Down Expand Up @@ -75,8 +75,7 @@ protected void beforeTest() {
.httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
if (getTestMode() == TestMode.PLAYBACK) {
batchClientBuilder.httpClient(interceptorManager.getPlaybackClient())
.credential(request -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)));
batchClientBuilder.httpClient(interceptorManager.getPlaybackClient()).credential(new MockTokenCredential());

addTestRulesOnPlayback(interceptorManager);
} else if (getTestMode() == TestMode.RECORD) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,24 @@
import com.azure.json.JsonProviders;
import com.azure.json.JsonReader;
import com.azure.storage.blob.BlobContainerClient;

import reactor.core.publisher.Mono;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
import org.junit.jupiter.api.parallel.Isolated;
import reactor.core.publisher.Mono;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

@Execution(ExecutionMode.SAME_THREAD)
@Isolated
Expand All @@ -76,9 +74,7 @@ protected void beforeTest() {
}
}

/*
* Test TypeSpec Shared model among GET-PUT Roundtrip operation
* */
// Test TypeSpec Shared model among GET-PUT Roundtrip operation
@SyncAsyncTest
public void testTaskUnifiedModel() {
String testModeSuffix = SyncAsyncExtension.execute(() -> "sync", () -> Mono.just("async"));
Expand Down Expand Up @@ -429,16 +425,15 @@ public void testAddMultiTasksWithError() {

Assertions.assertTrue(true, "Should not here");
} catch (RuntimeException ex) {
System.out.printf("Expect exception %s", ex.toString());
System.out.printf("Expect exception %s", ex);
}
}

// This test will temporarily only run in Live/Record mode. It runs fine in Playback mode too on Mac and Windows machines.
// Linux machines are causing issues. This issue is under investigation.
@DisabledIf(value = "skipInPlayback")
@Test
public void failIfPoisonTaskTooLargeSync() throws Exception {
//This test will temporarily only run in Live/Record mode. It runs fine in Playback mode too on Mac and Windows machines.
// Linux machines are causing issues. This issue is under investigation.
Assumptions.assumeFalse(getTestMode() == TestMode.PLAYBACK, "This Test only runs in Live/Record mode");

public void failIfPoisonTaskTooLargeSync() {
String jobId = getStringIdWithUserNamePrefix("-failIfPoisonTaskTooLarge-sync");
String taskId = "mytask-sync";

Expand All @@ -447,9 +442,9 @@ public void failIfPoisonTaskTooLargeSync() throws Exception {
BatchJobCreateParameters parameters = new BatchJobCreateParameters(jobId, poolInfo);
batchClient.createJob(parameters);

List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<BatchTaskCreateParameters>();
List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<>();
BatchTaskCreateParameters taskToAdd = new BatchTaskCreateParameters(taskId, "sleep 1");
List<ResourceFile> resourceFiles = new ArrayList<ResourceFile>();
List<ResourceFile> resourceFiles = new ArrayList<>();
ResourceFile resourceFile;

// If this test fails try increasing the size of the Task in case maximum size increase
Expand Down Expand Up @@ -501,12 +496,11 @@ public void failIfPoisonTaskTooLargeSync() throws Exception {
}
}

// This test will temporarily only run in Live/Record mode. It runs fine in Playback mode too on Mac and Windows machines.
// Linux machines are causing issues. This issue is under investigation.
@DisabledIf(value = "skipInPlayback")
@Test
public void failIfPoisonTaskTooLargeAsync() throws Exception {
//This test will temporarily only run in Live/Record mode. It runs fine in Playback mode too on Mac and Windows machines.
// Linux machines are causing issues. This issue is under investigation.
Assumptions.assumeFalse(getTestMode() == TestMode.PLAYBACK, "This Test only runs in Live/Record mode");

public void failIfPoisonTaskTooLargeAsync() {
String jobId = getStringIdWithUserNamePrefix("-failIfPoisonTaskTooLarge-async");
String taskId = "mytask-async";

Expand All @@ -515,9 +509,9 @@ public void failIfPoisonTaskTooLargeAsync() throws Exception {
BatchJobCreateParameters parameters = new BatchJobCreateParameters(jobId, poolInfo);
batchAsyncClient.createJob(parameters).block();

List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<BatchTaskCreateParameters>();
List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<>();
BatchTaskCreateParameters taskToAdd = new BatchTaskCreateParameters(taskId, "sleep 1");
List<ResourceFile> resourceFiles = new ArrayList<ResourceFile>();
List<ResourceFile> resourceFiles = new ArrayList<>();
ResourceFile resourceFile;

// If this test fails try increasing the size of the Task in case maximum size increase
Expand Down Expand Up @@ -560,13 +554,12 @@ public void failIfPoisonTaskTooLargeAsync() throws Exception {
}
}

// This test does not run in Playback mode. It only runs in Record/Live mode.
// This test uses multi threading. Playing back the test doesn't match its recorded sequence always.
// Hence Playback of this test is disabled.
@DisabledIf(value = "skipInPlayback")
@Test
public void succeedWithRetrySync() {
//This test does not run in Playback mode. It only runs in Record/Live mode.
// This test uses multi threading. Playing back the test doesn't match its recorded sequence always.
// Hence Playback of this test is disabled.
Assumptions.assumeFalse(getTestMode() == TestMode.PLAYBACK, "This Test only runs in Live/Record mode");

String jobId = getStringIdWithUserNamePrefix("-succeedWithRetry-sync");
String taskId = "mytask-sync";

Expand All @@ -575,9 +568,9 @@ public void succeedWithRetrySync() {
BatchJobCreateParameters jobToCreate = new BatchJobCreateParameters(jobId, poolInfo);
batchClient.createJob(jobToCreate);

List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<BatchTaskCreateParameters>();
List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<>();
BatchTaskCreateParameters taskToAdd;
List<ResourceFile> resourceFiles = new ArrayList<ResourceFile>();
List<ResourceFile> resourceFiles = new ArrayList<>();
ResourceFile resourceFile;

BatchTaskBulkCreateOptions option = new BatchTaskBulkCreateOptions();
Expand Down Expand Up @@ -612,13 +605,12 @@ public void succeedWithRetrySync() {
}
}

// This test does not run in Playback mode. It only runs in Record/Live mode.
// This test uses multi threading. Playing back the test doesn't match its recorded sequence always.
// Hence Playback of this test is disabled.
@DisabledIf(value = "skipInPlayback")
@Test
public void succeedWithRetryAsync() {
//This test does not run in Playback mode. It only runs in Record/Live mode.
// This test uses multi threading. Playing back the test doesn't match its recorded sequence always.
// Hence Playback of this test is disabled.
Assumptions.assumeFalse(getTestMode() == TestMode.PLAYBACK, "This Test only runs in Live/Record mode");

String jobId = getStringIdWithUserNamePrefix("-succeedWithRetry-async");
String taskId = "mytask-async";

Expand All @@ -627,9 +619,9 @@ public void succeedWithRetryAsync() {
BatchJobCreateParameters jobToCreate = new BatchJobCreateParameters(jobId, poolInfo);
batchAsyncClient.createJob(jobToCreate).block();

List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<BatchTaskCreateParameters>();
List<BatchTaskCreateParameters> tasksToAdd = new ArrayList<>();
BatchTaskCreateParameters taskToAdd;
List<ResourceFile> resourceFiles = new ArrayList<ResourceFile>();
List<ResourceFile> resourceFiles = new ArrayList<>();
ResourceFile resourceFile;

BatchTaskBulkCreateOptions option = new BatchTaskBulkCreateOptions();
Expand Down Expand Up @@ -879,16 +871,15 @@ public void testCreateTasks() {
}

@Test
public void testDeserializationOfBatchTaskStatistics() {
public void testDeserializationOfBatchTaskStatistics() throws IOException {
// Simulated JSON response with numbers as strings
String jsonResponse = "{" + "\"url\":\"http://example.com/statistics\","
+ "\"startTime\":\"2022-01-01T00:00:00Z\"," + "\"lastUpdateTime\":\"2022-01-01T01:00:00Z\","
+ "\"userCPUTime\":\"PT1H\"," + "\"kernelCPUTime\":\"PT2H\"," + "\"wallClockTime\":\"PT3H\","
+ "\"readIOps\":\"1000\"," + "\"writeIOps\":\"500\"," + "\"readIOGiB\":0.5," + "\"writeIOGiB\":0.25,"
+ "\"waitTime\":\"PT30M\"" + "}";
String jsonResponse = "{\"url\":\"http://example.com/statistics\",\"startTime\":\"2022-01-01T00:00:00Z\","
+ "\"lastUpdateTime\":\"2022-01-01T01:00:00Z\",\"userCPUTime\":\"PT1H\",\"kernelCPUTime\":\"PT2H\","
+ "\"wallClockTime\":\"PT3H\",\"readIOps\":\"1000\",\"writeIOps\":\"500\",\"readIOGiB\":0.5,"
+ "\"writeIOGiB\":0.25,\"waitTime\":\"PT30M\"}";

// Deserialize JSON response using JsonReader from JsonProviders
try (JsonReader jsonReader = JsonProviders.createReader(new StringReader(jsonResponse))) {
try (JsonReader jsonReader = JsonProviders.createReader(jsonResponse)) {
BatchTaskStatistics stats = BatchTaskStatistics.fromJson(jsonReader);

// Assertions
Expand All @@ -904,8 +895,20 @@ public void testDeserializationOfBatchTaskStatistics() {
Assertions.assertEquals(0.5, stats.getReadIoGiB());
Assertions.assertEquals(0.25, stats.getWriteIoGiB());
Assertions.assertEquals(Duration.parse("PT30M"), stats.getWaitTime());
} catch (IOException e) {
throw new RuntimeException(e);
}
}

private static boolean skipInPlayback() {
final String azureTestMode = Configuration.getGlobalConfiguration().get("AZURE_TEST_MODE");

if (azureTestMode != null) {
try {
return TestMode.valueOf(azureTestMode.toUpperCase(Locale.US)) == TestMode.PLAYBACK;
} catch (IllegalArgumentException e) {
return true; // TestMode unknown, default is PLAYBACK.
}
}

return true; // TestMode unknown, default is PLAYBACK.
}
}
2 changes: 1 addition & 1 deletion sdk/batch/microsoft-azure-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.18.4.1</version> <!-- {x-version-update;com.fasterxml.jackson.core:jackson-core;external_dependency} -->
<version>2.18.6</version> <!-- {x-version-update;com.fasterxml.jackson.core:jackson-core;external_dependency} -->
<scope>test</scope>
</dependency>

Expand Down
Loading
Loading