Skip to content

Commit

Permalink
Test testGrouping
Browse files Browse the repository at this point in the history
Signed-off-by: Heng Qian <[email protected]>
  • Loading branch information
qianheng-aws committed Nov 20, 2024
1 parent 3b2bc5a commit 5c7896f
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import Dependencies.*
import sbt.Keys.testGrouping

lazy val scala212 = "2.12.14"
lazy val sparkVersion = "3.5.1"
Expand Down Expand Up @@ -274,14 +275,19 @@ lazy val integtest = (project in file("integ-test"))
IntegrationTest / scalaSource := baseDirectory.value / "src/integration/scala",
IntegrationTest / resourceDirectory := baseDirectory.value / "src/integration/resources",
IntegrationTest / parallelExecution := true,
IntegrationTest / testForkedParallel := true,
IntegrationTest / testForkedParallel := false,
IntegrationTest / fork := true,
IntegrationTest / concurrentRestrictions := Seq(
Tags.limit(Tags.Test, 2),
Tags.limit(Tags.All, 2),
Tags.limit(Tags.ForkedTestGroup, 2),
Tags.limitAll(2)
),
IntegrationTest / testGrouping := {
val tests = (IntegrationTest / definedTests).value
val groups = tests.grouped(tests.size / 4 + 1).zipWithIndex.map { case (group, index) =>
new Tests.Group(
name = s"group-${index + 1}",
tests = group,
runPolicy = Tests.SubProcess(ForkOptions())
)
}
groups.toSeq
}
)),
inConfig(AwsIntegrationTest)(Defaults.testSettings ++ Seq(
AwsIntegrationTest / javaSource := baseDirectory.value / "src/aws-integration/java",
Expand Down

0 comments on commit 5c7896f

Please sign in to comment.