Skip to content

Commit

Permalink
Merge pull request #178 from dmlloyd/fix-125
Browse files Browse the repository at this point in the history
Test on multiple OSes
  • Loading branch information
dmlloyd authored Jul 3, 2024
2 parents 69ddbe6 + d481e4f commit fea4871
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
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

0 comments on commit fea4871

Please sign in to comment.