From ed63075b36e722bcfc3a2a7b63501bf35697d3cf Mon Sep 17 00:00:00 2001
From: Moritz Kiefer
Date: Fri, 4 Feb 2022 13:44:06 +0100
Subject: [PATCH 1/2] Migrate Haskell tests to Sandbox on X
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The diff here looks extremely confusing. sandbox-classic is now
sandbox on x not sandbox classic so this isn’t a typo. It is really
moving to sandbox on x.
changelog_begin
changelog_end
---
compiler/damlc/tests/BUILD.bazel | 6 +++---
daml-assistant/daml-helper/BUILD.bazel | 8 ++++----
language-support/hs/bindings/BUILD.bazel | 2 +-
libs-haskell/test-utils/DA/Test/Sandbox.hs | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/compiler/damlc/tests/BUILD.bazel b/compiler/damlc/tests/BUILD.bazel
index a7cca6ff945b..35d39a3030f3 100644
--- a/compiler/damlc/tests/BUILD.bazel
+++ b/compiler/damlc/tests/BUILD.bazel
@@ -609,7 +609,7 @@ da_haskell_test(
":repl-test.dar",
"//compiler/damlc",
"//daml-script/daml:daml-script.dar",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
"//ledger/test-common/test-certificates",
],
hackage_deps = [
@@ -652,7 +652,7 @@ da_haskell_test(
"//compiler/damlc/stable-packages",
"//compiler/repl-service/server:repl_service_jar",
"//daml-script/daml:daml-script.dar",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
],
hackage_deps = [
"async",
@@ -912,7 +912,7 @@ da_haskell_test(
data = [
":pkg-manager-test.dar",
"//compiler/damlc",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
],
hackage_deps = [
"base",
diff --git a/daml-assistant/daml-helper/BUILD.bazel b/daml-assistant/daml-helper/BUILD.bazel
index dd4d2d642e38..b77f8173948c 100644
--- a/daml-assistant/daml-helper/BUILD.bazel
+++ b/daml-assistant/daml-helper/BUILD.bazel
@@ -94,7 +94,7 @@ da_haskell_test(
srcs = ["test/DA/Daml/Helper/Test/Tls.hs"],
data = [
"daml-helper",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
"//ledger/test-common/test-certificates",
],
hackage_deps = [
@@ -120,7 +120,7 @@ da_haskell_test(
data = [
"//compiler/damlc",
"//daml-assistant/daml-helper",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
],
# TODO (MK) https://github.com/digital-asset/daml/issues/9768
flaky = True,
@@ -162,7 +162,7 @@ da_haskell_test(
"daml-helper",
":test.dar",
"//ledger-service/http-json:http-json-binary",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
],
hackage_deps = [
"base",
@@ -196,7 +196,7 @@ da_haskell_test(
"daml-helper",
":test.dar",
"//ledger-service/http-json:http-json-binary",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
],
hackage_deps = [
"base",
diff --git a/language-support/hs/bindings/BUILD.bazel b/language-support/hs/bindings/BUILD.bazel
index 553047d01f3e..a421e9573c76 100644
--- a/language-support/hs/bindings/BUILD.bazel
+++ b/language-support/hs/bindings/BUILD.bazel
@@ -51,7 +51,7 @@ da_haskell_test(
data = [
":for-tests.dar",
":for-upload.dar",
- "//ledger/sandbox:sandbox-binary",
+ "//ledger/sandbox-classic:sandbox-classic-binary",
],
# The tests throw flaky timeout errors. It looks like this comes
# from a fundamental issue in the Haskell bindings: they eagerly pull
diff --git a/libs-haskell/test-utils/DA/Test/Sandbox.hs b/libs-haskell/test-utils/DA/Test/Sandbox.hs
index 22e362d5bc09..535bad55f3e9 100644
--- a/libs-haskell/test-utils/DA/Test/Sandbox.hs
+++ b/libs-haskell/test-utils/DA/Test/Sandbox.hs
@@ -57,7 +57,7 @@ defaultSandboxConf = SandboxConfig
getSandboxProc :: SandboxConfig -> FilePath -> IO CreateProcess
getSandboxProc SandboxConfig{..} portFile = do
- sandbox <- locateRunfiles (mainWorkspace "ledger" "sandbox" exe "sandbox-binary")
+ sandbox <- locateRunfiles (mainWorkspace "ledger" "sandbox-classic" exe "sandbox-classic-binary")
tlsArgs <- if enableTls
then do
certDir <- locateRunfiles (mainWorkspace "ledger" "test-common" "test-certificates")
From 951c9b06c9a9b0bea3f9ab43ca544cd8802db413 Mon Sep 17 00:00:00 2001
From: Moritz Kiefer
Date: Mon, 7 Feb 2022 20:21:59 +0100
Subject: [PATCH 2/2] .
changelog_begin
changelog_end
---
language-support/hs/bindings/test/DA/Ledger/Tests.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/language-support/hs/bindings/test/DA/Ledger/Tests.hs b/language-support/hs/bindings/test/DA/Ledger/Tests.hs
index 68140df185b7..9383ac95519e 100644
--- a/language-support/hs/bindings/test/DA/Ledger/Tests.hs
+++ b/language-support/hs/bindings/test/DA/Ledger/Tests.hs
@@ -327,7 +327,7 @@ tGetLedgerConfiguration withSandbox = testCase "tGetLedgerConfiguration" $ run w
xs <- getLedgerConfiguration lid
Just (Right config) <- liftIO $ timeout 1 (takeStream xs)
let expected = LedgerConfiguration {
- maxDeduplicationTime = Duration {durationSeconds = 86400, durationNanos = 0}}
+ maxDeduplicationTime = Duration {durationSeconds = 1800, durationNanos = 0}}
liftIO $ assertEqual "config" expected config
tUploadDarFileBad :: SandboxTest