Skip to content

Tests timing should be fixed #2

Open
@wch

Description

@wch

The tests in test-client.R work if you step through them, but not if they're run all at once.

It does things like this, where last is set by the onMessage handler.

  ws$send(charToRaw("hello"))
  expect_identical(last, charToRaw("hello"))

The problem is that the expect_identical is called before the response is received. It would be nice to be able to add a line like waitfor(1), which returns if there's a response within one second (or if it has already occurred) and times out after one second.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions