Skip to content

Commit

Permalink
tests and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Jun 27, 2023
1 parent 0cc9b28 commit 44b0d89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/intgtest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Integration Tests
name: CI

on: workflow_dispatch
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
integration-test:
Expand All @@ -18,7 +25,7 @@ jobs:
run: |
hostname
echo "host is $HOSTNAME"
./gradlew clean test -x check
./gradlew clean test
env:
SDK_INTEGRATION_TESTS_SERVER_API_URL: ${{ secrets.SDK_INTEGRATION_TESTS_SERVER_API_URL }}
SDK_INTEGRATION_TESTS_SERVER_KEY_ID: ${{ secrets.SDK_INTEGRATION_TESTS_SERVER_KEY_ID }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import com.google.common.util.concurrent.Uninterruptibles;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -55,10 +57,10 @@ public void init() {
@Test
@DisplayName("Test workflow completion")
public void workflow() throws Exception {
List<String> workflowIds = startWorkflows(10, Commons.WORKFLOW_NAME);
List<String> workflowIds = startWorkflows(2, Commons.WORKFLOW_NAME);
workflowIds.add(startWorkflow(Commons.WORKFLOW_NAME));
this.taskRunnerConfigurer.init();
Thread.sleep(7 * 1000);
Uninterruptibles.sleepUninterruptibly(10, TimeUnit.SECONDS);
workflowIds.forEach(workflowId -> validateCompletedWorkflow(workflowId));
this.taskRunnerConfigurer.shutdown();
}
Expand Down

0 comments on commit 44b0d89

Please sign in to comment.