crew_test("relay wait() timeout condition", {
  x <- crew_relay()
  cv <- nanonext::cv()
  x$set_from(cv)
  x$start()
  time <- system.time(out <- x$wait(seconds_timeout = 2))
  expect_false(out)
  expect_gt(time["elapsed"], 1)
  expect_equal(nanonext::cv_value(x$condition), 0L)
  expect_equal(nanonext::cv_value(cv), 0L)
})
