Skip to content

Commit

Permalink
stops debug output in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinczenko committed Oct 22, 2024
1 parent 1aece9e commit 9906f2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
6 changes: 3 additions & 3 deletions build.nims
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ task testContracts, "Build & run Codex Contract tests":

task testIntegration, "Run integration tests":
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
test "testIntegration", params = "-d:chronicles_sinks=textlines[notimestamps,stdout],textlines[dynamic] " &
"-d:chronicles_enabled_topics:integration:TRACE"
# test "testIntegration", params = "-d:chronicles_sinks=textlines[notimestamps,stdout],textlines[dynamic] " &
# "-d:chronicles_enabled_topics:integration:TRACE"

task build, "build codex binary":
codexTask()
Expand Down
19 changes: 6 additions & 13 deletions tests/integration/testvalidator.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from std/times import inMilliseconds, initDuration, inSeconds, fromUnix
import std/strformat
import std/sequtils
import std/sugar
import pkg/codex/logutils
Expand All @@ -25,7 +24,7 @@ template eventuallyS*(expression: untyped, timeout=10, step = 5,
var i = 0
while not expression:
inc i
echo (i*step).seconds
# echo (i*step).seconds
if endTime < Moment.now():
return false
if cancelExpression:
Expand Down Expand Up @@ -117,7 +116,7 @@ marketplacesuite "Validation":

clients:
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
.withLogTopics("purchases", "onchain")
.some,
Expand All @@ -135,7 +134,7 @@ marketplacesuite "Validation":
.withValidationGroups(groups = 2)
.withValidationGroupIndex(idx = 0, groupIndex = 0)
.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
.withLogTopics("validator") # each topic as a separate string argument
.some
Expand Down Expand Up @@ -171,8 +170,6 @@ marketplacesuite "Validation":

debug "validation suite", purchaseId = purchaseId.toHex, requestId = requestId

echo fmt"expiry = {(expiry + 60).int.seconds}"

check eventuallyS(client0.purchaseStateIs(purchaseId, "started"),
timeout = (expiry + 60).int, step = 5)

Expand All @@ -181,8 +178,7 @@ marketplacesuite "Validation":
fail()
return

debug "validation suite", purchaseState = purchaseState
echo fmt"{purchaseState = }"
debug "validation suite", purchaseState = purchaseState

if purchaseState != "started":
fail()
Expand Down Expand Up @@ -214,7 +210,7 @@ marketplacesuite "Validation":

clients:
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
.withLogTopics("purchases", "onchain")
.some,
Expand Down Expand Up @@ -258,8 +254,6 @@ marketplacesuite "Validation":

debug "validation suite", purchaseId = purchaseId.toHex, requestId = requestId

echo fmt"expiry = {(expiry + 60).int.seconds}"

check eventuallyS(client0.purchaseStateIs(purchaseId, "started"),
timeout = (expiry + 60).int, step = 5)

Expand All @@ -269,7 +263,6 @@ marketplacesuite "Validation":
return

debug "validation suite", purchaseState = purchaseState
echo fmt"{purchaseState = }"

if purchaseState != "started":
fail()
Expand All @@ -283,7 +276,7 @@ marketplacesuite "Validation":
.withValidationGroups(groups = 2)
.withValidationGroupIndex(idx = 0, groupIndex = 0)
.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
.withLogTopics("validator") # each topic as a separate string argument

Expand Down

0 comments on commit 9906f2f

Please sign in to comment.