Skip to content

Add synchronous call to EventHub.shared.start() for use in testing  #951

Open
@kevinlind

Description

@kevinlind

Task description

Improve performance and stability of unit tests which make use of the EventHub by adding a synchronous call to EventHub.shared.start() to allow test cases ensure the EventHub has started before running tests.
The Edge extension's EdgePublicAPITests were failing because calls to registerEventListener were failing presumably because the EventHub wasn't fully started. Adding a sleep() call after calling start() resolves the issue, but getting a signal from the EventHub when start() completes is a better option. Searching the repos shows several extensions call EventHub.shared.start() from unit tests, though I'm not aware of over test failures.

Additional implementation details or code snippet(s)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskItem that can be completed as a standalone code change or is part of an epic.Used by issue templates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions