Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on multiple OSes #178

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 11 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ on:

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
name: Build on ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Check out project
uses: actions/checkout@v4

- name: Set up JDKs
uses: actions/setup-java@v4
with:
Expand All @@ -24,5 +30,6 @@ jobs:
11
17
21

- name: Build with Maven
run: mvn verify -ntp -B -Djava11.home=$JAVA_HOME_11_X64 -Djava17.home=$JAVA_HOME_17_X64
run: mvn verify -ntp -B "-Djava11.home=${{env.JAVA_HOME_11_X64}}${{env.JAVA_HOME_11_ARM64}}" "-Djava17.home=${{env.JAVA_HOME_17_X64}}${{env.JAVA_HOME_17_ARM64}}"
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ public void testShutdownNow(ExecutorType executorType) throws InterruptedExcepti
assertThatThrownBy(() -> view.execute(NullRunnable.getInstance()))
.as("Submitting work after invoking shutdown or shutdownNow should fail")
.isInstanceOf(RejectedExecutionException.class);
Awaitility.waitAtMost(500, TimeUnit.MILLISECONDS).untilAsserted(() -> {
Awaitility.waitAtMost(3, TimeUnit.SECONDS).untilAsserted(() -> {
assertThat(interrupted).isTrue();
assertThat(view.isTerminated()).isFalse();
});
interruptedLatch.countDown();
Awaitility.waitAtMost(500, TimeUnit.MILLISECONDS)
Awaitility.waitAtMost(3, TimeUnit.SECONDS)
.untilAsserted(() -> assertThat(view.isTerminated()).as("%s", view).isTrue());

assertCleanShutdown(cached);
Expand Down Expand Up @@ -182,7 +182,7 @@ public void testShutdown(ExecutorType executorType) throws InterruptedException
.as("Submitting work after invoking shutdown or shutdown should fail")
.isInstanceOf(RejectedExecutionException.class);
assertThat(view.isTerminated()).isFalse();
Awaitility.waitAtMost(600, TimeUnit.MILLISECONDS)
Awaitility.waitAtMost(3, TimeUnit.SECONDS)
.untilAsserted(() -> assertThat(view.isTerminated()).as("%s", view).isTrue());
assertThat(interrupted).isFalse();

Expand Down