Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from sandbox to sandbox-classic in daml test-script #11476

Merged
merged 2 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion daml-script/runner/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ da_scala_library(
"//ledger/ledger-configuration",
"//ledger/ledger-resources",
"//ledger/participant-integration-api",
"//ledger/sandbox-classic:sandbox-classic-{}".format(edition),
"//ledger/sandbox",
"//ledger/sandbox-common",
"//libs-scala/ports",
"//libs-scala/resources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.daml.lf.data.Ref
import com.daml.lf.data.Ref.{Identifier, PackageId, QualifiedName}
import com.daml.lf.engine.script.ledgerinteraction.ScriptTimeMode
import com.daml.lf.language.Ast.Package
import com.daml.platform.sandbox.SandboxServer
import com.daml.platform.sandboxnext
import com.daml.platform.sandbox.config.SandboxConfig
import com.daml.platform.services.time.TimeProviderType
import com.daml.ports.Port
Expand Down Expand Up @@ -81,9 +81,9 @@ object TestMain extends StrictLogging {
port = Port.Dynamic,
timeProviderType = Some(timeProviderType),
)
val sandboxResource = SandboxServer.owner(sandboxConfig).acquire()
val sandboxResource = new sandboxnext.Runner(sandboxConfig).acquire()
val sandboxPort =
Await.result(sandboxResource.asFuture.flatMap(_.portF).map(_.value), Duration.Inf)
Await.result(sandboxResource.asFuture.map(_.value), Duration.Inf)
(ApiParameters("localhost", sandboxPort, None, None), () => sandboxResource.release())
} else {
(
Expand Down