Skip to content

E2E testing: Make node_log_contains more robust #1423

@cmichi

Description

@cmichi

Follow-up to #1395.

The E2E testing framework contains a function node_log_contains that basically does a full text search on a node log:

assert!(client.node_log_contains("requested value: 100000000000000\n"));

The issue with this function is that it returns true as soon as the supplied String is found in the log file. This is a bit unfortunate, if one executes multiple tests in parallel (as cargo test does by default) then it could be that

  • Test A calls a contract that outputs the String to the log
  • Test B calls the same contract that should output the String as well, but it actually fails to do so.

Both tests would show up as succeed though, as Test B still finds the String in the log currently.

I don't have a good idea how to fix this yet, maybe someone else has?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ink_env[ink_env] work item

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions