Skip to content

await new Promise((resolve) => setTimeout(() => resolve(), 500)) #137

Open
@vaibhavdaren

Description

@vaibhavdaren

Fix tests

can you explain this
await new Promise((resolve) => setTimeout(() => resolve(), 500))

during the shutdown of superset, somewhere the thread is not waiting for an async system operation to finish. Thus, the operation is delegated to the system but the execution is not blocked or does not wait for the async operation to finish. In the meantime, the test case execution finishes, jest is shutting down and complains about an open handle. So this is making the jest to wait for some time to finish the execution and disable the open handle issue, during npm run test

Originally posted by @Rupeshiya in #135 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions