Skip to content

Question about testing block_on code with wstd::test #113

@tomasol

Description

@tomasol

I use block_on to run async code inside the synchronous exported functions to comply with generated bindings.
In my integration tests I want to

  1. Run some async code
  2. call the exported function
  3. Run some more async code

I cannot use wstd::test as it triggers "cannot wstd::runtime::block_on inside an existing block_on!", so I use regular tests and wrap step 1 and 3 with block_on. Is there a better way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions