From d706bb1ca09ac4f8926c3810c3735c4c740f361f Mon Sep 17 00:00:00 2001 From: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> Date: Fri, 3 Jan 2020 14:50:35 -0800 Subject: [PATCH] Print out test name before running test --- .../src/test/java/com/azure/storage/blob/batch/APISpec.groovy | 3 +++ .../storage/blob/specialized/cryptography/APISpec.groovy | 4 ++++ .../src/test/java/com/azure/storage/blob/APISpec.groovy | 4 +++- .../test/java/com/azure/storage/file/datalake/APISpec.groovy | 3 +++ .../src/test/java/com/azure/storage/file/share/APISpec.groovy | 4 +++- .../src/test/java/com/azure/storage/queue/APISpec.groovy | 3 +++ 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy index 73bd51cc2e88..25715cb1cdeb 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/APISpec.groovy @@ -98,6 +98,9 @@ class APISpec extends Specification { this.interceptorManager = new InterceptorManager(className + fullTestName, testMode) this.resourceNamer = new TestResourceNamer(className + testName, testMode, interceptorManager.getRecordedData()) + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, fullTestName) + // If the test doesn't have the Requires tag record it in live mode. recordLiveMode = specificationContext.getCurrentIteration().getDescription().getAnnotation(Requires.class) == null diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy index e50e3ad98cfa..c52685549cba 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/APISpec.groovy @@ -114,6 +114,10 @@ class APISpec extends Specification { this.testName = fullTestName.substring(0, substringIndex) this.interceptorManager = new InterceptorManager(className + fullTestName, testMode) this.resourceNamer = new TestResourceNamer(className + testName, testMode, interceptorManager.getRecordedData()) + + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, fullTestName) + // If the test doesn't have the Requires tag record it in live mode. recordLiveMode = specificationContext.getCurrentIteration().getDescription().getAnnotation(Requires.class) == null connectionString = Configuration.getGlobalConfiguration().get("AZURE_STORAGE_BLOB_CONNECTION_STRING") diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index e989f13dc8c4..993df1c42454 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -148,7 +148,6 @@ class APISpec extends Specification { // in case the upload or download open too many connections. System.setProperty("reactor.bufferSize.x", "16") System.setProperty("reactor.bufferSize.small", "100") - System.out.println(String.format("--------%s---------", testMode)) } def setup() { @@ -160,6 +159,9 @@ class APISpec extends Specification { this.interceptorManager = new InterceptorManager(className + fullTestName, testMode) this.resourceNamer = new TestResourceNamer(className + testName, testMode, interceptorManager.getRecordedData()) + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, fullTestName) + // If the test doesn't have the Requires tag record it in live mode. recordLiveMode = specificationContext.getCurrentIteration().getDescription().getAnnotation(Requires.class) != null diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy index de45e7a54c5c..eb705adca0aa 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy @@ -128,6 +128,9 @@ class APISpec extends Specification { this.interceptorManager = new InterceptorManager(className + fullTestName, testMode) this.resourceNamer = new TestResourceNamer(className + testName, testMode, interceptorManager.getRecordedData()) + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, fullTestName) + // If the test doesn't have the Requires tag record it in live mode. recordLiveMode = specificationContext.getCurrentIteration().getDescription().getAnnotation(Requires.class) == null diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/APISpec.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/APISpec.groovy index b128c69724a6..10292a61741d 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/APISpec.groovy +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/APISpec.groovy @@ -16,7 +16,6 @@ import com.azure.core.util.Configuration import com.azure.core.util.logging.ClientLogger import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.file.share.models.ListSharesOptions -import org.junit.jupiter.api.Test import spock.lang.Specification import java.time.Duration @@ -64,6 +63,9 @@ class APISpec extends Specification { connectionString = "DefaultEndpointsProtocol=https;AccountName=teststorage;" + "AccountKey=atestaccountkey;EndpointSuffix=core.windows.net" } + + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, testName) } /** diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy index 8645fa1173ac..4fe7f9cab994 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy @@ -59,6 +59,9 @@ class APISpec extends Specification { connectionString = "DefaultEndpointsProtocol=https;AccountName=teststorage;AccountKey=atestaccountkey;" + "EndpointSuffix=core.windows.net" } + + // Print out the test name to create breadcrumbs in our test logging in case anything hangs. + System.out.printf("========================= %s.%s =========================%n", className, testName) } /**