Skip to content

Commit c9a69ab

Browse files
authored
Fix timings in tests (#237)
* Fix tests timing * Amend one other timing * Formatting
1 parent e7997db commit c9a69ab

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

tests/testthat/test-private-loops.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ test_that("next_op_secs works", {
460460

461461
later(function() {}, 0.1)
462462
expect_true(next_op_secs() <= 0.1)
463-
run_now(0.15)
463+
run_now(2)
464464

465465
current_loop()
466466
})

tests/testthat/test-run_now.R

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,13 @@ test_that("Callbacks cannot affect the caller", {
146146
# to return from because it (f()) already returned.
147147
f <- function() {
148148
delayedAssign("throw", return(100))
149-
later(
150-
function() {
151-
throw
152-
},
153-
0.5
154-
)
149+
later(function() {
150+
throw
151+
})
155152
return(200)
156153
}
157154
g <- function() {
158-
run_now(1)
155+
run_now(2)
159156
}
160157
expect_equal(f(), 200)
161158
expect_snapshot(error = TRUE, g())

0 commit comments

Comments
 (0)