Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4aed9c4
tests fix
YunchuWang Mar 20, 2025
4c3e502
Merge branch 'main' into wangbill/test-fix
YunchuWang Mar 20, 2025
2e93482
Update build-validation.yml and build.gradle to enforce test failure …
YunchuWang Mar 20, 2025
8eb53b5
Merge branch 'wangbill/test-fix' of https://github.com/microsoft/dura…
YunchuWang Mar 20, 2025
a9fe0d6
build docker from sidecar repo
YunchuWang Mar 20, 2025
2ee5264
Revert "build docker from sidecar repo"
YunchuWang Mar 20, 2025
d50ffda
update sidecar
YunchuWang Mar 20, 2025
cd53889
fail at last step
YunchuWang Mar 20, 2025
10c3930
Add deployment steps for test reports to GitHub Pages
YunchuWang Mar 20, 2025
0d05f72
fix tests
YunchuWang Mar 20, 2025
5b6692d
Revert "Add deployment steps for test reports to GitHub Pages"
YunchuWang Mar 20, 2025
9dfffde
surface sidecar log
YunchuWang Mar 20, 2025
ef9d465
cleanup error tests state
YunchuWang Mar 20, 2025
99aef8c
Add logging for Durable Task Sidecar and update integration test setup
YunchuWang Mar 20, 2025
78644d9
Add upload step for Durable Task Sidecar logs in build validation wor…
YunchuWang Mar 20, 2025
a15f678
Enhance integration tests by adding retry functionality. Updated test…
YunchuWang Mar 20, 2025
8e4b898
Update build-validation workflow to remove signing step from local Ma…
YunchuWang Mar 20, 2025
000f1ad
Add orchestrator service protobuf definitions for Durable Task framework
YunchuWang Mar 20, 2025
dcd964d
fix func sample e2e tests
YunchuWang Mar 20, 2025
1ea7bd5
fix func e2e tests
YunchuWang Mar 20, 2025
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
23 changes: 20 additions & 3 deletions .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,27 @@ jobs:

# TODO: Move the sidecar into a central image repository
- name: Initialize Durable Task Sidecar
run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d kaibocai/durabletask-sidecar:latest start --backend Emulator
run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d peterstone2019/durabletask-sidecar:latest start --backend Emulator

- name: Display Durable Task Sidecar Logs
run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 &

# wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar
- name: Wait for 10 seconds
run: sleep 10

- name: Integration Tests with Gradle
run: ./gradlew integrationTest
run: ./gradlew integrationTest || echo "TEST_FAILED=true" >> $GITHUB_ENV
continue-on-error: true

- name: Kill Durable Task Sidecar
run: docker kill durabletask-sidecar

- name: Upload Durable Task Sidecar Logs
uses: actions/upload-artifact@v4
with:
name: Durable Task Sidecar Logs
path: durabletask-sidecar.log

- name: Archive test report
uses: actions/upload-artifact@v4
Expand All @@ -67,6 +80,10 @@ jobs:
name: Package
path: client/build/libs

- name: Fail the job if tests failed
if: env.TEST_FAILED == 'true'
run: exit 1

functions-e2e-tests:

needs: build
Expand Down Expand Up @@ -124,7 +141,7 @@ jobs:
uses: gradle/gradle-build-action@v2

- name: Publish to local
run: ./gradlew publishToMavenLocal -x sign
run: ./gradlew publishToMavenLocal

- name: Build azure functions sample
run: ./gradlew azureFunctionsPackage
Expand Down
2 changes: 2 additions & 0 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ task integrationTest(type: Test) {
dependsOn build
shouldRunAfter test
testLogging.showStandardStreams = true

ignoreFailures = false
}

publishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.jupiter.api.extension.ExtendWith;

import java.time.Duration;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;

import org.junit.jupiter.api.BeforeEach;
import static org.junit.jupiter.api.Assertions.*;

/**
Expand All @@ -23,8 +25,15 @@
* client operations and sends invocation instructions to the DurableTaskWorker).
*/
@Tag("integration")
@ExtendWith(TestRetryExtension.class)
public class ErrorHandlingIntegrationTests extends IntegrationTestBase {
@Test
@BeforeEach
private void startUp() {
DurableTaskClient client = new DurableTaskGrpcClientBuilder().build();
client.deleteTaskHub();
}

@RetryingTest
void orchestratorException() throws TimeoutException {
final String orchestratorName = "OrchestratorWithException";
final String errorMessage = "Kah-BOOOOOM!!!";
Expand All @@ -50,7 +59,7 @@ void orchestratorException() throws TimeoutException {
}
}

@ParameterizedTest
@RetryingParameterizedTest
@ValueSource(booleans = {true, false})
void activityException(boolean handleException) throws TimeoutException {
final String orchestratorName = "OrchestratorWithActivityException";
Expand Down Expand Up @@ -102,7 +111,7 @@ void activityException(boolean handleException) throws TimeoutException {
}
}

@ParameterizedTest
@RetryingParameterizedTest
@ValueSource(ints = {1, 2, 10})
public void retryActivityFailures(int maxNumberOfAttempts) throws TimeoutException {
// There is one task for each activity call and one task between each retry
Expand All @@ -116,7 +125,7 @@ public void retryActivityFailures(int maxNumberOfAttempts) throws TimeoutExcepti
});
}

@ParameterizedTest
@RetryingParameterizedTest
@ValueSource(ints = {1, 2, 10})
public void retryActivityFailuresWithCustomLogic(int maxNumberOfAttempts) throws TimeoutException {
// This gets incremented every time the retry handler is invoked
Expand All @@ -133,7 +142,7 @@ public void retryActivityFailuresWithCustomLogic(int maxNumberOfAttempts) throws
assertEquals(maxNumberOfAttempts, retryHandlerCalls.get());
}

@ParameterizedTest
@RetryingParameterizedTest
@ValueSource(booleans = {true, false})
void subOrchestrationException(boolean handleException) throws TimeoutException {
final String orchestratorName = "OrchestrationWithBustedSubOrchestrator";
Expand Down Expand Up @@ -183,7 +192,7 @@ void subOrchestrationException(boolean handleException) throws TimeoutException
}
}

@ParameterizedTest
@RetryingParameterizedTest
@ValueSource(ints = {1, 2, 10})
public void retrySubOrchestratorFailures(int maxNumberOfAttempts) throws TimeoutException {
// There is one task for each sub-orchestrator call and one task between each retry
Expand All @@ -198,7 +207,7 @@ public void retrySubOrchestratorFailures(int maxNumberOfAttempts) throws Timeout
});
}

@ParameterizedTest
@RetryingParameterizedTest
@ValueSource(ints = {1, 2, 10})
public void retrySubOrchestrationFailuresWithCustomLogic(int maxNumberOfAttempts) throws TimeoutException {
// This gets incremented every time the retry handler is invoked
Expand Down
Loading
Loading