Skip to content

Commit

Permalink
reorder integration tests order so that azure-cosmos is executed at l…
Browse files Browse the repository at this point in the history
…ast due to its intermittent failure

Signed-off-by: Jianguo Ma <[email protected]>
  • Loading branch information
majguo committed Dec 27, 2024
1 parent ae43b92 commit fdd0e0d
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/run-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ set -Eeuo pipefail
# - EVENTHUBS_NAMESPACE
# - EVENTHUBS_EVENTHUB_NAME

# Test azure-services-disabled
mvn -f azure-services-disabled/pom.xml test-compile failsafe:integration-test -Dnative -Dazure.test=true
mvn -f azure-services-disabled/pom.xml verify -Dazure.test=true

# Azure Storage Blob Extension
# Authenticate to Azure Storage Blob with Microsoft Entra ID and connection string
# Get the endpoint of azure storage blob
Expand Down Expand Up @@ -64,6 +68,24 @@ export QUARKUS_AZURE_KEYVAULT_SECRET_ENDPOINT=$(az keyvault show --name "${KEY_V
mvn -f azure-keyvault/pom.xml test-compile failsafe:integration-test -Dnative -Dazure.test=true
mvn -f azure-keyvault/pom.xml verify -Dazure.test=true

# Azure Event Hubs Extension
# Retrieve the event hub resource ID
EVENTHUBS_EVENTHUB_RESOURCE_ID=$(az eventhubs eventhub show \
--resource-group $RESOURCE_GROUP_NAME \
--namespace-name $EVENTHUBS_NAMESPACE \
--name $EVENTHUBS_EVENTHUB_NAME \
--query 'id' \
--output tsv)
# Assign the "Azure Event Hubs Data Owner" role to the current signed-in identity
az role assignment create \
--role "Azure Event Hubs Data Owner" \
--assignee ${OBJECT_ID} \
--scope $EVENTHUBS_EVENTHUB_RESOURCE_ID
export QUARKUS_AZURE_EVENTHUBS_NAMESPACE=${EVENTHUBS_NAMESPACE}
export QUARKUS_AZURE_EVENTHUBS_EVENTHUB_NAME=${EVENTHUBS_EVENTHUB_NAME}
mvn -f azure-eventhubs/pom.xml test-compile failsafe:integration-test -Dnative -Dazure.test=true
mvn -f azure-eventhubs/pom.xml verify -Dazure.test=true

# Azure Cosmos Extension
# Authenticate to Azure Cosmos DB with Microsoft Entra ID and key
# Export the endpoint of azure cosmos db
Expand Down Expand Up @@ -98,25 +120,3 @@ mvn -f azure-cosmos/pom.xml test-compile failsafe:integration-test -Dnative -Daz
mvn -f azure-cosmos/pom.xml test-compile failsafe:integration-test -Dnative -Dazure.test=true -Dquarkus.azure.cosmos.key=${AZURE_COSMOS_KEY}
mvn -f azure-cosmos/pom.xml verify -Dazure.test=true
mvn -f azure-cosmos/pom.xml verify -Dazure.test=true -Dquarkus.azure.cosmos.key=${AZURE_COSMOS_KEY}

# Azure Event Hubs Extension
# Retrieve the event hub resource ID
EVENTHUBS_EVENTHUB_RESOURCE_ID=$(az eventhubs eventhub show \
--resource-group $RESOURCE_GROUP_NAME \
--namespace-name $EVENTHUBS_NAMESPACE \
--name $EVENTHUBS_EVENTHUB_NAME \
--query 'id' \
--output tsv)
# Assign the "Azure Event Hubs Data Owner" role to the current signed-in identity
az role assignment create \
--role "Azure Event Hubs Data Owner" \
--assignee ${OBJECT_ID} \
--scope $EVENTHUBS_EVENTHUB_RESOURCE_ID
export QUARKUS_AZURE_EVENTHUBS_NAMESPACE=${EVENTHUBS_NAMESPACE}
export QUARKUS_AZURE_EVENTHUBS_EVENTHUB_NAME=${EVENTHUBS_EVENTHUB_NAME}
mvn -f azure-eventhubs/pom.xml test-compile failsafe:integration-test -Dnative -Dazure.test=true
mvn -f azure-eventhubs/pom.xml verify -Dazure.test=true

# Test azure-services-disabled
mvn -f azure-services-disabled/pom.xml test-compile failsafe:integration-test -Dnative -Dazure.test=true
mvn -f azure-services-disabled/pom.xml verify -Dazure.test=true

0 comments on commit fdd0e0d

Please sign in to comment.