From f2b3080bce315c1d6d043d4760d5611ad683867a Mon Sep 17 00:00:00 2001 From: zaneli Date: Sat, 9 Aug 2025 19:51:51 +0900 Subject: [PATCH 1/5] fix Download Athena JDBC v3 Driver --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72362d8..60c4a76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: java-version: ${{ matrix.java }} distribution: adopt - name: Download Athena JDBC v3 Driver - run: mkdir -p lib && curl -L -o lib/athena-v3.jar curl -L -O https://downloads.athena.us-east-1.amazonaws.com/drivers/JDBC/3.5.1/athena-jdbc-3.5.1-with-dependencies.jar + run: mkdir -p lib && curl -L -o lib/athena-v3.jar https://downloads.athena.us-east-1.amazonaws.com/drivers/JDBC/3.5.1/athena-jdbc-3.5.1-with-dependencies.jar shell: bash - name: Download Athena JDBC v2 Driver run: mkdir -p lib && curl -L -o lib/athena-v2.jar https://downloads.athena.us-east-1.amazonaws.com/drivers/JDBC/SimbaAthenaJDBC-2.1.1.1000/AthenaJDBC42-2.1.1.1000.jar From 570bfda54a5ce97cf83697f108595bf8cfd81eb1 Mon Sep 17 00:00:00 2001 From: zaneli Date: Sat, 9 Aug 2025 19:53:08 +0900 Subject: [PATCH 2/5] use setup-scala --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60c4a76..0a4f242 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: olafurpg/setup-scala@v14 with: java-version: ${{ matrix.java }} distribution: adopt From 155a07c8f29139be2345b926411a945ddab5c6ac Mon Sep 17 00:00:00 2001 From: zaneli Date: Sat, 9 Aug 2025 20:00:18 +0900 Subject: [PATCH 3/5] replace distribution --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a4f242..a12f17a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: uses: olafurpg/setup-scala@v14 with: java-version: ${{ matrix.java }} - distribution: adopt + distribution: temurin - name: Download Athena JDBC v3 Driver run: mkdir -p lib && curl -L -o lib/athena-v3.jar https://downloads.athena.us-east-1.amazonaws.com/drivers/JDBC/3.5.1/athena-jdbc-3.5.1-with-dependencies.jar shell: bash From ce87dd6ef1864be7ee67d086881ea3a8daab78a7 Mon Sep 17 00:00:00 2001 From: zaneli Date: Sat, 9 Aug 2025 20:33:17 +0900 Subject: [PATCH 4/5] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bcda33..c755bf6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Library for using [Amazon Athena](https://aws.amazon.com/athena/) JDBC Driver wi ## setup - Download Athena JDBC driver - - This library supports both Athena (https://docs.aws.amazon.com/athena/latest/ug/jdbc-v3-driver.html) and https://docs.aws.amazon.com/athena/latest/ug/jdbc-v2.html. + - This library supports both Athena JDBC [3.x](https://docs.aws.amazon.com/athena/latest/ug/jdbc-v3-driver.html) and [2.x](https://docs.aws.amazon.com/athena/latest/ug/jdbc-v2.html) driver. If you encounter problems with a particular version, please feel free to [report it](https://github.com/zaneli/scalikejdbc-athena/issues). ```sh > mkdir lib From e808bff455575823e77f6e76b44e40f7906ce032 Mon Sep 17 00:00:00 2001 From: zaneli Date: Sat, 9 Aug 2025 20:57:10 +0900 Subject: [PATCH 5/5] fix call `DriverManager.getDrivers` --- build.sbt | 5 +++++ src/test/scala/scalikejdbc/athena/UsingOtherDBSpec.scala | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 8e8f96e..a80ab3c 100644 --- a/build.sbt +++ b/build.sbt @@ -21,3 +21,8 @@ libraryDependencies ++= Seq( ) publishTo := sonatypePublishTo.value + +Test / testOptions += Tests.Setup { () => + // Call this method to prevent stopping test on the way, but I don't know reason why... + java.sql.DriverManager.getDrivers +} diff --git a/src/test/scala/scalikejdbc/athena/UsingOtherDBSpec.scala b/src/test/scala/scalikejdbc/athena/UsingOtherDBSpec.scala index 474222d..459cd86 100644 --- a/src/test/scala/scalikejdbc/athena/UsingOtherDBSpec.scala +++ b/src/test/scala/scalikejdbc/athena/UsingOtherDBSpec.scala @@ -1,6 +1,5 @@ package scalikejdbc.athena -import java.sql.DriverManager import java.time.{ZoneId, ZonedDateTime} import org.scalatest.BeforeAndAfter @@ -8,8 +7,6 @@ import org.scalatest.funspec.AnyFunSpec import scalikejdbc._ class UsingOtherDBSpec extends AnyFunSpec with BeforeAndAfter { - // call this method to prevent stopping test on the way, but i don't know reason why... - DriverManager.getDrivers before { NamedDB(User.connectionPoolName).athena { implicit s =>