Skip to content

Commit

Permalink
Fix log capturing in Storage live tests (#39030)
Browse files Browse the repository at this point in the history
  • Loading branch information
alzimmermsft authored Feb 29, 2024
1 parent d292829 commit 60e323e
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 204 deletions.
16 changes: 0 additions & 16 deletions sdk/storage/azure-storage-blob-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
</scm>

<properties>
<src.dir>src/main/java</src.dir>
<test.dir>src/test/java</test.dir>
<AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>../azure-storage-common/ci.system.properties</AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>
<!-- 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>
Expand Down Expand Up @@ -117,12 +115,6 @@
<version>3.2.7</version> <!-- {x-version-update;cglib:cglib-nodep;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand All @@ -132,14 +124,6 @@
</dependencies>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
16 changes: 0 additions & 16 deletions sdk/storage/azure-storage-blob-changefeed/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
</scm>

<properties>
<src.dir>src/main/java</src.dir>
<test.dir>src/test/java</test.dir>
<AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>../azure-storage-common/ci.system.properties</AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>
<!-- 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>
Expand Down Expand Up @@ -132,12 +130,6 @@
<version>1.14.8</version> <!-- {x-version-update;testdep_net.bytebuddy:byte-buddy-agent;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand Down Expand Up @@ -165,14 +157,6 @@
</dependencies>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/azure-storage-blob-cryptography/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand Down
16 changes: 0 additions & 16 deletions sdk/storage/azure-storage-blob-nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
</scm>

<properties>
<src.dir>src/main/java</src.dir>
<test.dir>src/test/java</test.dir>
<AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>../azure-storage-common/ci.system.properties</AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>
<!-- 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>
Expand Down Expand Up @@ -111,12 +109,6 @@
<version>3.2.7</version> <!-- {x-version-update;cglib:cglib-nodep;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand Down Expand Up @@ -146,14 +138,6 @@
</dependencies>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
16 changes: 0 additions & 16 deletions sdk/storage/azure-storage-blob/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
</scm>

<properties>
<src.dir>src/main/java</src.dir>
<test.dir>src/test/java</test.dir>
<AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>../azure-storage-common/ci.system.properties</AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>
<surefireXmx>8g</surefireXmx>
<!-- 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. -->
Expand Down Expand Up @@ -174,12 +172,6 @@
<version>1.14.8</version> <!-- {x-version-update;testdep_net.bytebuddy:byte-buddy-agent;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand All @@ -189,14 +181,6 @@
</dependencies>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
90 changes: 0 additions & 90 deletions sdk/storage/azure-storage-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,31 +107,12 @@
<version>3.4.34</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
<version>1.11.18</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>2.4-M1-groovy-4.0</version> <!-- {x-version-update;org.spockframework:spock-core;external_dependency} -->
<scope>test</scope>
</dependency>
<!--The Groovy version that Spock Core brings in (4.0.6) does not support Java 21, so we need to override it with a version that does.-->
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>4.0.15</version> <!-- {x-version-update;org.apache.groovy:groovy;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -201,77 +182,6 @@
</rules>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>3.0.2</version> <!-- {x-version-update;org.codehaus.gmavenplus:gmavenplus-plugin;external_dependency} -->
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>generateTestStubs</goal>
<goal>compileTests</goal>
<goal>removeTestStubs</goal>
</goals>
<phase>test-compile</phase>
</execution>
</executions>
<configuration>
<skipTests>${skipTestCompile}</skipTests>
<testSources>
<testSource>
<directory>${project.basedir}/src/test</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
<testSource>
<directory>${project.basedir}/src/test-shared</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
</testSources>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>java9plus</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
<executions>
<execution>
<id>default-testCompile</id>
<phase>process-test-sources</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<failOnWarning>false</failOnWarning>
<compilerArgs>
<compilerArg>--add-reads</compilerArg>
<compilerArg>com.azure.storage.common=java.desktop</compilerArg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
8 changes: 0 additions & 8 deletions sdk/storage/azure-storage-file-datalake/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
</scm>

<properties>
<src.dir>src/main/java</src.dir>
<test.dir>src/test/java</test.dir>
<AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>../azure-storage-common/ci.system.properties</AZURE_TEST_SYSTEM_PLAYBACK_PROPERTIES_FILE>
<surefireXmx>4096m</surefireXmx>
<!-- 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. -->
Expand Down Expand Up @@ -134,12 +132,6 @@
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/azure-storage-file-share/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@
<version>12.26.0-beta.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/azure-storage-internal-avro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/azure-storage-queue/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@
<version>1.11.2</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
Expand Down
18 changes: 0 additions & 18 deletions sdk/storage/tests-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,6 @@ stages:
${{ if eq(variables['JavaTestVersion'], '1.8') }}:
JAVA_HOME: $(JAVA_HOME_8_X64)
condition: and(succeeded(), eq(variables['StorageRunStressScenarios'], 'true'))
- pwsh: |
New-Item $(Build.ArtifactStagingDirectory)/test-logs -ItemType directory
Copy-Item sdk/storage/azure-storage-blob/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-blob-batch/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-batch-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-blob-changefeed/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-changefeed-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-blob-cryptography/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-cryptography-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-blob-nio/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-nio-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-common/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-common-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-file-datalake/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-file-datalake-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-file-share/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-file-share-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-internal-avro/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-internal-avro-test.log -ErrorAction SilentlyContinue
Copy-Item sdk/storage/azure-storage-queue/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-queue-test.log -ErrorAction SilentlyContinue
displayName: 'Copy test logs to artifact staging'
condition: always()
- publish: $(Build.ArtifactStagingDirectory)/test-logs
displayName: 'Publish test logs'
artifact: test-log-$(System.StageName)-$(System.JobName)-$(System.JobAttempt)
condition: always()
EnvVars:
AZURE_TENANT_ID: $(STORAGE_TENANT_ID)
AZURE_CLIENT_ID: $(STORAGE_CLIENT_ID)
Expand Down

0 comments on commit 60e323e

Please sign in to comment.