2022-01-03 19:36:51 +03:00
|
|
|
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2021-03-25 10:35:43 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
load(
|
|
|
|
"//bazel_tools:scala.bzl",
|
|
|
|
"da_scala_binary",
|
|
|
|
"da_scala_library",
|
|
|
|
"da_scala_test_suite",
|
|
|
|
)
|
|
|
|
load("//ledger/ledger-api-test-tool:conformance.bzl", "conformance_test")
|
|
|
|
load("@os_info//:os_info.bzl", "is_windows")
|
|
|
|
|
|
|
|
da_scala_library(
|
|
|
|
name = "sandbox-on-x",
|
|
|
|
srcs = glob(["src/main/scala/**/*.scala"]),
|
|
|
|
resources = glob(["src/main/resources/**/*"]),
|
|
|
|
scala_deps = [
|
|
|
|
"@maven//:com_github_scopt_scopt",
|
|
|
|
"@maven//:com_typesafe_akka_akka_actor",
|
|
|
|
"@maven//:com_typesafe_akka_akka_stream",
|
2021-12-17 10:38:16 +03:00
|
|
|
"@maven//:org_scala_lang_modules_scala_java8_compat",
|
2021-03-25 10:35:43 +03:00
|
|
|
],
|
|
|
|
tags = ["maven_coordinates=com.daml:sandbox-on-x:__VERSION__"],
|
|
|
|
visibility = [
|
|
|
|
"//visibility:public",
|
|
|
|
],
|
|
|
|
deps = [
|
2021-11-26 15:23:17 +03:00
|
|
|
"//daml-lf/archive:daml_lf_1.dev_archive_proto_java",
|
2021-12-17 10:38:16 +03:00
|
|
|
"//daml-lf/archive:daml_lf_archive_reader",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//daml-lf/data",
|
|
|
|
"//daml-lf/engine",
|
2021-12-17 10:38:16 +03:00
|
|
|
"//daml-lf/language",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//daml-lf/transaction",
|
|
|
|
"//language-support/scala/bindings",
|
|
|
|
"//ledger/caching",
|
2021-12-17 10:38:16 +03:00
|
|
|
"//ledger/error",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//ledger/ledger-api-auth",
|
|
|
|
"//ledger/ledger-api-common",
|
2022-01-06 11:06:29 +03:00
|
|
|
"//ledger/ledger-api-domain",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//ledger/ledger-api-health",
|
2021-07-15 16:03:19 +03:00
|
|
|
"//ledger/ledger-configuration",
|
2021-07-15 18:53:03 +03:00
|
|
|
"//ledger/ledger-offset",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//ledger/ledger-resources",
|
|
|
|
"//ledger/metrics",
|
|
|
|
"//ledger/participant-integration-api",
|
|
|
|
"//ledger/participant-state",
|
2021-12-17 10:38:16 +03:00
|
|
|
"//ledger/participant-state-index",
|
|
|
|
"//ledger/participant-state-metrics",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//ledger/participant-state/kvutils",
|
|
|
|
"//ledger/participant-state/kvutils/app",
|
2022-01-06 11:06:29 +03:00
|
|
|
"//libs-scala/concurrent",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//libs-scala/contextualized-logging",
|
2021-12-17 10:38:16 +03:00
|
|
|
"//libs-scala/logging-entries",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//libs-scala/resources",
|
|
|
|
"//libs-scala/resources-akka",
|
|
|
|
"//libs-scala/resources-grpc",
|
|
|
|
"@maven//:com_google_guava_guava",
|
|
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
2021-12-17 10:38:16 +03:00
|
|
|
"@maven//:io_dropwizard_metrics_metrics_core",
|
2021-03-25 10:35:43 +03:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_test_suite(
|
|
|
|
name = "sandbox-on-x-tests",
|
|
|
|
size = "small",
|
2021-12-22 02:27:30 +03:00
|
|
|
srcs = glob(
|
|
|
|
["src/test/suite/**/*.scala"],
|
|
|
|
),
|
|
|
|
data = [],
|
|
|
|
jvm_flags = [],
|
|
|
|
plugins = [],
|
2021-03-25 10:35:43 +03:00
|
|
|
resources = glob(["src/test/resources/**/*"]),
|
|
|
|
scala_deps = [
|
|
|
|
"@maven//:org_mockito_mockito_scala",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":sandbox-on-x",
|
|
|
|
"//daml-lf/data",
|
2021-12-22 02:27:30 +03:00
|
|
|
"//daml-lf/transaction",
|
|
|
|
"//ledger/ledger-api-domain",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//ledger/ledger-api-health",
|
2021-12-22 02:27:30 +03:00
|
|
|
"//ledger/ledger-configuration",
|
|
|
|
"//ledger/ledger-offset",
|
2021-03-25 10:35:43 +03:00
|
|
|
"//ledger/participant-state",
|
2022-01-06 15:04:15 +03:00
|
|
|
"//libs-scala/contextualized-logging",
|
2021-12-22 02:27:30 +03:00
|
|
|
"//libs-scala/logging-entries",
|
|
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
2021-03-25 10:35:43 +03:00
|
|
|
"@maven//:org_mockito_mockito_core",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_library(
|
|
|
|
name = "sandbox-on-x-app",
|
|
|
|
srcs = glob(["src/app/scala/**/*.scala"]),
|
|
|
|
resources = glob(["src/app/resources/**/*"]),
|
|
|
|
scala_deps = [
|
|
|
|
],
|
|
|
|
tags = ["maven_coordinates=com.daml:sandbox-on-x-app:__VERSION__"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
":sandbox-on-x",
|
|
|
|
"//ledger/ledger-resources",
|
|
|
|
"//libs-scala/contextualized-logging",
|
|
|
|
"//libs-scala/resources",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
da_scala_binary(
|
|
|
|
name = "app",
|
|
|
|
main_class = "com.daml.ledger.sandbox.Main",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
runtime_deps = [
|
|
|
|
"@maven//:ch_qos_logback_logback_classic",
|
|
|
|
"@maven//:ch_qos_logback_logback_core",
|
|
|
|
"@maven//:com_h2database_h2",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":sandbox-on-x-app",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
conformance_test(
|
|
|
|
name = "conformance-test",
|
|
|
|
ports = [6865],
|
|
|
|
server = ":app",
|
|
|
|
server_args = [
|
|
|
|
"--contract-id-seeding=testing-weak",
|
|
|
|
"--participant participant-id=example,port=6865",
|
2021-09-20 10:52:46 +03:00
|
|
|
"--mutable-contract-state-cache",
|
2021-03-25 10:35:43 +03:00
|
|
|
],
|
|
|
|
test_tool_args = [
|
|
|
|
"--verbose",
|
2021-09-14 15:00:30 +03:00
|
|
|
"--additional=ParticipantPruningIT",
|
|
|
|
"--additional=MultiPartySubmissionIT",
|
2021-03-25 10:35:43 +03:00
|
|
|
"--exclude=CommandDeduplicationIT",
|
2021-09-14 15:00:30 +03:00
|
|
|
"--exclude=ClosedWorldIT",
|
2021-03-25 10:35:43 +03:00
|
|
|
"--exclude=ContractKeysIT",
|
|
|
|
"--exclude=SemanticTests",
|
2021-03-26 01:07:01 +03:00
|
|
|
"--exclude=RaceConditionIT",
|
2021-07-28 13:14:56 +03:00
|
|
|
"--exclude=ExceptionRaceConditionIT",
|
2021-09-20 10:52:46 +03:00
|
|
|
"--exclude=ExceptionsIT:ExRollbackDuplicateKeyCreated",
|
|
|
|
"--exclude=ExceptionsIT:ExRollbackDuplicateKeyArchived",
|
|
|
|
"--exclude=ConfigManagementServiceIT:CMConcurrentSetConflicting",
|
2021-08-26 11:45:01 +03:00
|
|
|
# Disable tests targeting only append-only schema functionality
|
2021-09-06 14:50:54 +03:00
|
|
|
"--exclude=ParticipantPruningIT:PRLocalAndNonLocalRetroactiveDivulgences,ParticipantPruningIT:PRRetroactiveDivulgences,ParticipantPruningIT:PRImmediateAndRetroactiveDivulgence",
|
2021-03-25 10:35:43 +03:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-06 11:06:29 +03:00
|
|
|
conformance_test(
|
|
|
|
name = "conformance-test-conflict-checking",
|
|
|
|
ports = [6865],
|
|
|
|
server = ":app",
|
|
|
|
server_args = [
|
|
|
|
"--contract-id-seeding=testing-weak",
|
|
|
|
"--participant participant-id=example,port=6865",
|
|
|
|
"--mutable-contract-state-cache",
|
|
|
|
"--enable-conflict-checking",
|
|
|
|
],
|
|
|
|
test_tool_args = [
|
|
|
|
"--verbose",
|
|
|
|
"--additional=ParticipantPruningIT",
|
|
|
|
"--additional=MultiPartySubmissionIT",
|
|
|
|
"--exclude=ConfigManagementServiceIT:CMConcurrentSetConflicting",
|
|
|
|
# Exclude offset command deduplication tests as
|
|
|
|
# Sandbox-on-X has support only for participant side deduplication,
|
|
|
|
# which in turn only has support for durations as deduplication periods.
|
|
|
|
"--exclude=CommandDeduplicationIT:ParticipantCommandDeduplicationDeduplicateUsingOffsets",
|
|
|
|
# Disable tests targeting only multi-participant setups
|
|
|
|
"--exclude=ParticipantPruningIT:PRImmediateAndRetroactiveDivulgence",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2021-03-25 10:35:43 +03:00
|
|
|
conformance_test(
|
|
|
|
name = "benchmark-performance-envelope",
|
|
|
|
ports = [6865],
|
|
|
|
server = ":app",
|
|
|
|
server_args = [
|
|
|
|
"--contract-id-seeding=testing-weak",
|
|
|
|
"--participant=participant-id=example,port=6865",
|
2021-09-20 10:52:46 +03:00
|
|
|
"--mutable-contract-state-cache",
|
2021-03-25 10:35:43 +03:00
|
|
|
],
|
|
|
|
test_tool_args = [
|
|
|
|
"--verbose",
|
|
|
|
"--perf-tests=PerformanceEnvelope.Throughput.TwentyOPS",
|
|
|
|
"--perf-tests=PerformanceEnvelope.Latency.1000ms",
|
|
|
|
"--perf-tests=PerformanceEnvelope.TransactionSize.1000KB",
|
|
|
|
],
|
|
|
|
)
|