From 299496388a1cb2e2696d91a32fd18df9c5a04470 Mon Sep 17 00:00:00 2001 From: Hyunwoo Nam Date: Mon, 12 Feb 2024 15:23:41 +0900 Subject: [PATCH 1/2] fix Thread/sleep hangs on Java 19+ --- test/com/walmartlabs/lacinia/tracing_test.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/com/walmartlabs/lacinia/tracing_test.clj b/test/com/walmartlabs/lacinia/tracing_test.clj index a51d8454..7ac2d2d0 100644 --- a/test/com/walmartlabs/lacinia/tracing_test.clj +++ b/test/com/walmartlabs/lacinia/tracing_test.clj @@ -26,6 +26,8 @@ [com.walmartlabs.lacinia.tracing :as tracing] [com.walmartlabs.lacinia.schema :as schema])) +(set! *warn-on-reflection* true) + (def ^:private enable-timing (tracing/enable-tracing nil)) ;; Used to convert nanos to millis @@ -41,7 +43,7 @@ [_ _ value] (let [resolved-value (resolve/resolve-promise) f (fn [] - (Thread/sleep (::delay value)) + (Thread/sleep ^long (::delay value)) (resolve/deliver! resolved-value (::slow value))) thread (Thread. ^Runnable f)] (.start thread) From 93f8a121fd951ced76ac5089a5ab7c4f56ff3e4a Mon Sep 17 00:00:00 2001 From: Hyunwoo Nam Date: Mon, 12 Feb 2024 15:28:46 +0900 Subject: [PATCH 2/2] [CI] add java-version dimesion to test matrix --- .github/workflows/config.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index df000281..bdd30043 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -8,14 +8,17 @@ on: - master jobs: build: + strategy: + matrix: + java-version: ["11", "17", "21"] runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.4.0 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v3.10.0 + uses: actions/setup-java@v4 with: - java-version: '11' + java-version: ${{ matrix.java-version }} distribution: 'corretto' - name: Setup Clojure uses: DeLaGuardo/setup-clojure@10.2 @@ -23,7 +26,7 @@ jobs: cli: 1.11.1.1165 - name: Cache clojure dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository