Skip to content

[LIVY-1066] Upgrade scalatest to 3.2.9 and scalatra to 2.8.4 - #539

Open
roczei wants to merge 1 commit into
apache:masterfrom
roczei:LIVY-1066
Open

[LIVY-1066] Upgrade scalatest to 3.2.9 and scalatra to 2.8.4#539
roczei wants to merge 1 commit into
apache:masterfrom
roczei:LIVY-1066

Conversation

@roczei

@roczei roczei commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Upgrade scalatest 3.0.8 -> 3.2.9 and scalatra 2.6.5 -> 2.8.4. Both upgrades are prerequisites for Spark 4 / Scala 2.13 support (parent JIRA LIVY-1041) and are split into a dedicated commit to keep test migrations separate from core Spark 4 source changes for easier review.

Scalatest 3.0.8 -> 3.2.9:

  • Migrate FunSuite/FunSpec/FunSpecLike/FlatSpec test classes to their 3.2 successors AnyFunSuite/AnyFunSpec/AnyFunSpecLike/AnyFlatSpec.
  • Move org.scalatest.Matchers to org.scalatest.matchers.should.Matchers.
  • Add org.scalatestplus:mockito-3-4_${scala.binary.version}:3.2.9.0, since scalatest 3.2 moved MockitoSugar.mock into a separate scalatestplus artifact.

Scalatra 2.6.5 -> 2.8.4:

  • Bump metrics.version 3.1.0 -> 4.2.19: scalatra 2.8.x's metrics-servlets pulls in Dropwizard metrics 4.x, and keeping metrics-core / metrics-healthchecks at 3.1.0 causes a NoClassDefFoundError for HealthCheckFilter at runtime.

How was this patch tested?

  • Unit tests: mvn verify -Pspark3 -Pscala-2.12 -Pthriftserver passes on JDK 8/17 for all modules with the migrated ScalaTest 3.2 test suites (matching what was verified as part of the parent LIVY-1041 branch).
  • The metrics 4.2.19 bump is tested by the integration test suite (mvn integration-test -Pspark3 -Pscala-2.12 -pl :livy-integration-test), which previously failed with NoClassDefFoundError: com/codahale/metrics/servlets/HealthCheckFilter on MiniCluster startup and now passes.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

## What changes were proposed in this pull request?

Upgrade scalatest 3.0.8 -> 3.2.9 and scalatra 2.6.5 -> 2.8.4. Both
upgrades are prerequisites for Spark 4 / Scala 2.13 support (parent
JIRA LIVY-1041) and are split into a dedicated commit to keep test
migrations separate from core Spark 4 source changes for easier review.

Scalatest 3.0.8 -> 3.2.9:
- Migrate FunSuite/FunSpec/FunSpecLike/FlatSpec test classes to their
  3.2 successors AnyFunSuite/AnyFunSpec/AnyFunSpecLike/AnyFlatSpec.
- Move `org.scalatest.Matchers` to
  `org.scalatest.matchers.should.Matchers`.
- Add `org.scalatestplus:mockito-3-4_${scala.binary.version}:3.2.9.0`,
  since scalatest 3.2 moved `MockitoSugar.mock` into a separate
  scalatestplus artifact.

Scalatra 2.6.5 -> 2.8.4:
- Bump `metrics.version` 3.1.0 -> 4.2.19: scalatra 2.8.x's
  metrics-servlets pulls in Dropwizard metrics 4.x, and keeping
  metrics-core / metrics-healthchecks at 3.1.0 causes a
  NoClassDefFoundError for HealthCheckFilter at runtime.

## How was this patch tested?

- Unit tests: `mvn verify -Pspark3 -Pscala-2.12 -Pthriftserver` passes
  on JDK 8/17 for all modules with the migrated ScalaTest 3.2 test
  suites (matching what was verified as part of the parent LIVY-1041
  branch).
- The metrics 4.2.19 bump is tested by the integration test suite
  (`mvn integration-test -Pspark3 -Pscala-2.12 -pl
  :livy-integration-test`), which previously failed with
  `NoClassDefFoundError: com/codahale/metrics/servlets/HealthCheckFilter`
  on MiniCluster startup and now passes.

## Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)
@roczei

roczei commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Hi @gyogal and @ArnavBalyan,

This PR is ready for code review. Could you please take a look at this when you have a moment? Any feedback you provide would be greatly appreciated! Thank you!

Comment thread pom.xml
<dependency>
<groupId>org.scalatestplus</groupId>
<artifactId>mockito-3-4_${scala.binary.version}</artifactId>
<version>3.2.9.0</version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to introduce a new variable for this? It is not necessary as for now, it is only used once, but since this is related to scalatest.version which may change, it may be good to put this value closer to that variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants