From eb811ad5e35a57252e9d86217e42466d8183d121 Mon Sep 17 00:00:00 2001 From: ray chen Date: Thu, 11 Dec 2025 18:27:45 +0000 Subject: [PATCH 1/2] Overrided temp dir in test run step --- eng/pipelines/templates/steps/build-and-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/templates/steps/build-and-test.yml b/eng/pipelines/templates/steps/build-and-test.yml index e8a39bb29072..a159e10970c5 100644 --- a/eng/pipelines/templates/steps/build-and-test.yml +++ b/eng/pipelines/templates/steps/build-and-test.yml @@ -116,7 +116,7 @@ steps: $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants - mvn --% -f $(Build.SourcesDirectory)/pom.xml $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} ${{ parameters.TestGoals }} + mvn --% -f $(Build.SourcesDirectory)/pom.xml $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} ${{ parameters.TestGoals }} exit $LASTEXITCODE env: JAVA_HOME: $(PowerShellJavaHome) @@ -133,7 +133,7 @@ steps: displayName: 'Run tests' inputs: mavenPomFile: pom.xml - options: '$(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }}' + options: '$(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }}' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaTestVersion) @@ -206,7 +206,7 @@ steps: $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants - mvn --% -f $(Build.SourcesDirectory)/ClientFromSourcePom.xml ${{ parameters.TestGoals }} $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} $(LiveTestSourceParams) ${{ parameters.BuildOptions }} -T ${{ parameters.TestParallelization }} + mvn --% -f $(Build.SourcesDirectory)/ClientFromSourcePom.xml ${{ parameters.TestGoals }} $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} $(LiveTestSourceParams) ${{ parameters.BuildOptions }} -T ${{ parameters.TestParallelization }} exit $LASTEXITCODE env: # PowerShellJavaHome is set in the 'Set PowerShellJavaHome' @@ -224,9 +224,9 @@ steps: # For the "From Source" runs we don't want the -am switch as we don't care about running tests for our # dependencies, but we do want the -amd switch because we want to run tests on things that depend on us. ${{ if eq(parameters.IsLiveTest, 'true') }}: - options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} + options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} ${{ else }}: - options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -amd -T ${{ parameters.TestParallelization }} + options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -amd -T ${{ parameters.TestParallelization }} mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaTestVersion) From f187a007d5b63b3642f3f80013775a01864de264 Mon Sep 17 00:00:00 2001 From: ray chen Date: Thu, 11 Dec 2025 20:01:27 +0000 Subject: [PATCH 2/2] Updated DefaultTestOptions to include tempDir setting --- eng/pipelines/templates/steps/build-and-test.yml | 10 +++++----- eng/pipelines/templates/variables/globals.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/templates/steps/build-and-test.yml b/eng/pipelines/templates/steps/build-and-test.yml index a159e10970c5..e8a39bb29072 100644 --- a/eng/pipelines/templates/steps/build-and-test.yml +++ b/eng/pipelines/templates/steps/build-and-test.yml @@ -116,7 +116,7 @@ steps: $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants - mvn --% -f $(Build.SourcesDirectory)/pom.xml $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} ${{ parameters.TestGoals }} + mvn --% -f $(Build.SourcesDirectory)/pom.xml $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} ${{ parameters.TestGoals }} exit $LASTEXITCODE env: JAVA_HOME: $(PowerShellJavaHome) @@ -133,7 +133,7 @@ steps: displayName: 'Run tests' inputs: mavenPomFile: pom.xml - options: '$(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }}' + options: '$(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }}' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaTestVersion) @@ -206,7 +206,7 @@ steps: $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants - mvn --% -f $(Build.SourcesDirectory)/ClientFromSourcePom.xml ${{ parameters.TestGoals }} $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} $(LiveTestSourceParams) ${{ parameters.BuildOptions }} -T ${{ parameters.TestParallelization }} + mvn --% -f $(Build.SourcesDirectory)/ClientFromSourcePom.xml ${{ parameters.TestGoals }} $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} $(LiveTestSourceParams) ${{ parameters.BuildOptions }} -T ${{ parameters.TestParallelization }} exit $LASTEXITCODE env: # PowerShellJavaHome is set in the 'Set PowerShellJavaHome' @@ -224,9 +224,9 @@ steps: # For the "From Source" runs we don't want the -am switch as we don't care about running tests for our # dependencies, but we do want the -amd switch because we want to run tests on things that depend on us. ${{ if eq(parameters.IsLiveTest, 'true') }}: - options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} + options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -T ${{ parameters.TestParallelization }} ${{ else }}: - options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Djava.io.tmpdir=$(Agent.TempDirectory) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -amd -T ${{ parameters.TestParallelization }} + options: $(DefaultTestOptions) -DAZURE_TEST_DEBUG=$(IsDebug) -Dparallel-test-playback=${{ parameters.ParallelTestPlayback }} ${{ parameters.TestOptions }} -amd -T ${{ parameters.TestParallelization }} mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaTestVersion) diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index 674aaebc4750..770c8854683f 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -30,7 +30,7 @@ variables: LoggingOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=$(MavenLogLevel) -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' MemoryOptions: '-Xmx4096m' DefaultSkipOptions: '-Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -DtrimStackTrace=false -Dspotless.apply.skip=true -Dspotless.check.skip=true' - DefaultTestOptions: '$(DefaultOptions) $(DefaultSkipOptions) -pl $(ProjectList)' + DefaultTestOptions: '$(DefaultOptions) $(DefaultSkipOptions) -Djava.io.tmpdir=$(Agent.TempDirectory) -pl $(ProjectList)' DefaultTestMavenOptions: '$(MemoryOptions) $(LoggingOptions)' AdditionalOptions: ''