Skip to content

Commit

Permalink
[ledger-api-test-tool] - Remove static time flag which was replaced b…
Browse files Browse the repository at this point in the history
…y a feature descriptor (digital-asset#12714)
  • Loading branch information
nicu-da authored Feb 2, 2022
1 parent 0f4e952 commit c6ed12d
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,6 @@ object Cli {
success
)

opt[Unit]("static-time")
.optional()
.action((_, c) => c.copy(staticTime = true))
.text("Must be enabled if the ledger is using static time")

help("help").text("Prints this usage text")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ final case class Config(
partyAllocation: PartyAllocationConfiguration,
ledgerClockGranularity: FiniteDuration,
uploadDars: Boolean,
staticTime: Boolean,
) {
def withTlsConfig(modify: TlsConfiguration => TlsConfiguration): Config = {
val base = tlsConfig.getOrElse(TlsConfiguration.Empty)
Expand Down Expand Up @@ -61,6 +60,5 @@ object Config {
partyAllocation = PartyAllocationConfiguration.ClosedWorldWaitingForAllParticipants,
ledgerClockGranularity = tests.Defaults.LedgerClockGranularity,
uploadDars = true,
staticTime = tests.Defaults.StaticTime,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ object LedgerApiTestTool {
val config = Cli.parse(args).getOrElse(sys.exit(1))

val defaultTests: Vector[LedgerTestSuite] = Tests.default(
timeoutScaleFactor = config.timeoutScaleFactor,
staticTime = config.staticTime,
timeoutScaleFactor = config.timeoutScaleFactor
)
val optionalTests: Vector[LedgerTestSuite] = Tests.optional()
val visibleTests: Vector[LedgerTestSuite] = defaultTests ++ optionalTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ import scala.util.control.NonFatal
import scala.util.{Failure, Success}

final class CommandDeduplicationIT(
timeoutScaleFactor: Double,
staticTime: Boolean,
timeoutScaleFactor: Double
) extends LedgerTestSuite {

private[this] val logger: Logger = LoggerFactory.getLogger(getClass.getName)
Expand Down Expand Up @@ -206,7 +205,7 @@ final class CommandDeduplicationIT(
"DeduplicationMixedClients",
"Deduplicate commands within the deduplication time window using the command client and the command submission client",
allocate(Parties(16)),
enabled = _ => !staticTime,
enabled = !_.staticTime,
disabledReason = "Cannot work in static time as we run multiple test cases in parallel",
runConcurrently = false, // updates the time model
timeoutScale = 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@ object Defaults {
// We therefore limit the maximum number of concurrent tests, to avoid overwhelming the ledger.
val ConcurrentRuns: Int = sys.runtime.availableProcessors min 4

val StaticTime: Boolean = false

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ object Tests {
}

def default(
timeoutScaleFactor: Double = Defaults.TimeoutScaleFactor,
staticTime: Boolean = Defaults.StaticTime,
timeoutScaleFactor: Double = Defaults.TimeoutScaleFactor
): Vector[LedgerTestSuite] =
Vector(
new ActiveContractsServiceIT,
new ClosedWorldIT,
new CommandDeduplicationIT(timeoutScaleFactor, staticTime),
new CommandDeduplicationIT(timeoutScaleFactor),
new CommandDeduplicationParallelIT,
new CommandDeduplicationPeriodValidationIT,
new CommandServiceIT,
Expand Down
1 change: 0 additions & 1 deletion ledger/sandbox-classic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ server_conformance_test(
"--concurrent-test-runs=1", # sandbox classic doesn't scale well with concurrent tests (almost no effect on overall run time)
"--timeout-scale-factor=2", # sandbox classic is slow in general
"--open-world",
"--static-time",
"--exclude=ClosedWorldIT",
],
)
1 change: 0 additions & 1 deletion ledger/sandbox-on-x/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ conformance_test(
],
test_tool_args = [
"--verbose",
"--static-time",
],
)

Expand Down
1 change: 0 additions & 1 deletion ledger/sandbox/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ conformance_test(
"--static-time",
],
test_tool_args = [
"--static-time",
"--open-world",
"--exclude=ClosedWorldIT",
],
Expand Down

0 comments on commit c6ed12d

Please sign in to comment.