stops debug output in CI

This commit is contained in:
Marcin Czenko 2024-10-22 06:06:14 +02:00
parent 1aece9efcc
commit 9906f2f990
No known key found for this signature in database
GPG Key ID: 33DEA0C8E30937C0
2 changed files with 9 additions and 16 deletions

View File

@ -40,10 +40,10 @@ task testContracts, "Build & run Codex Contract tests":
task testIntegration, "Run integration tests": task testIntegration, "Run integration tests":
buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE -d:codex_enable_proof_failures=true" buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE -d:codex_enable_proof_failures=true"
# test "testIntegration" test "testIntegration"
# use params to enable logging from the integration test executable # use params to enable logging from the integration test executable
test "testIntegration", params = "-d:chronicles_sinks=textlines[notimestamps,stdout],textlines[dynamic] " & # test "testIntegration", params = "-d:chronicles_sinks=textlines[notimestamps,stdout],textlines[dynamic] " &
"-d:chronicles_enabled_topics:integration:TRACE" # "-d:chronicles_enabled_topics:integration:TRACE"
task build, "build codex binary": task build, "build codex binary":
codexTask() codexTask()

View File

@ -1,5 +1,4 @@
from std/times import inMilliseconds, initDuration, inSeconds, fromUnix from std/times import inMilliseconds, initDuration, inSeconds, fromUnix
import std/strformat
import std/sequtils import std/sequtils
import std/sugar import std/sugar
import pkg/codex/logutils import pkg/codex/logutils
@ -25,7 +24,7 @@ template eventuallyS*(expression: untyped, timeout=10, step = 5,
var i = 0 var i = 0
while not expression: while not expression:
inc i inc i
echo (i*step).seconds # echo (i*step).seconds
if endTime < Moment.now(): if endTime < Moment.now():
return false return false
if cancelExpression: if cancelExpression:
@ -117,7 +116,7 @@ marketplacesuite "Validation":
clients: clients:
CodexConfigs.init(nodes=1) CodexConfigs.init(nodes=1)
.debug() # uncomment to enable console log output # .debug() # uncomment to enable console log output
.withLogFile() # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log .withLogFile() # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log
.withLogTopics("purchases", "onchain") .withLogTopics("purchases", "onchain")
.some, .some,
@ -135,7 +134,7 @@ marketplacesuite "Validation":
.withValidationGroups(groups = 2) .withValidationGroups(groups = 2)
.withValidationGroupIndex(idx = 0, groupIndex = 0) .withValidationGroupIndex(idx = 0, groupIndex = 0)
.withValidationGroupIndex(idx = 1, groupIndex = 1) .withValidationGroupIndex(idx = 1, groupIndex = 1)
.debug() # uncomment to enable console log output # .debug() # uncomment to enable console log output
.withLogFile() # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log .withLogFile() # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log
.withLogTopics("validator") # each topic as a separate string argument .withLogTopics("validator") # each topic as a separate string argument
.some .some
@ -171,8 +170,6 @@ marketplacesuite "Validation":
debug "validation suite", purchaseId = purchaseId.toHex, requestId = requestId debug "validation suite", purchaseId = purchaseId.toHex, requestId = requestId
echo fmt"expiry = {(expiry + 60).int.seconds}"
check eventuallyS(client0.purchaseStateIs(purchaseId, "started"), check eventuallyS(client0.purchaseStateIs(purchaseId, "started"),
timeout = (expiry + 60).int, step = 5) timeout = (expiry + 60).int, step = 5)
@ -181,8 +178,7 @@ marketplacesuite "Validation":
fail() fail()
return return
debug "validation suite", purchaseState = purchaseState debug "validation suite", purchaseState = purchaseState
echo fmt"{purchaseState = }"
if purchaseState != "started": if purchaseState != "started":
fail() fail()
@ -214,7 +210,7 @@ marketplacesuite "Validation":
clients: clients:
CodexConfigs.init(nodes=1) CodexConfigs.init(nodes=1)
.debug() # uncomment to enable console log output # .debug() # uncomment to enable console log output
.withLogFile() # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log .withLogFile() # uncomment to output log file to tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log
.withLogTopics("purchases", "onchain") .withLogTopics("purchases", "onchain")
.some, .some,
@ -258,8 +254,6 @@ marketplacesuite "Validation":
debug "validation suite", purchaseId = purchaseId.toHex, requestId = requestId debug "validation suite", purchaseId = purchaseId.toHex, requestId = requestId
echo fmt"expiry = {(expiry + 60).int.seconds}"
check eventuallyS(client0.purchaseStateIs(purchaseId, "started"), check eventuallyS(client0.purchaseStateIs(purchaseId, "started"),
timeout = (expiry + 60).int, step = 5) timeout = (expiry + 60).int, step = 5)
@ -269,7 +263,6 @@ marketplacesuite "Validation":
return return
debug "validation suite", purchaseState = purchaseState debug "validation suite", purchaseState = purchaseState
echo fmt"{purchaseState = }"
if purchaseState != "started": if purchaseState != "started":
fail() fail()
@ -283,7 +276,7 @@ marketplacesuite "Validation":
.withValidationGroups(groups = 2) .withValidationGroups(groups = 2)
.withValidationGroupIndex(idx = 0, groupIndex = 0) .withValidationGroupIndex(idx = 0, groupIndex = 0)
.withValidationGroupIndex(idx = 1, groupIndex = 1) .withValidationGroupIndex(idx = 1, groupIndex = 1)
.debug() # uncomment to enable console log output # .debug() # uncomment to enable console log output
.withLogFile() # uncomment to output log file to: # tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log .withLogFile() # uncomment to output log file to: # tests/integration/logs/<start_datetime> <suite_name>/<test_name>/<node_role>_<node_idx>.log
.withLogTopics("validator") # each topic as a separate string argument .withLogTopics("validator") # each topic as a separate string argument