Skip to content

Commit

Permalink
gc() in tests to close connections
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Dec 20, 2018
1 parent 94f5d44 commit 2c343f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/test-messages.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ context("messages")
test_that("messages in callr::r do not crash session", {
ret <- r(function() { cliapp::cli_text("fooobar"); 1 + 1 })
expect_identical(ret, 2)
gc()
})

test_that("messages in callr::r_bg do not crash session", {
Expand All @@ -13,4 +14,7 @@ test_that("messages in callr::r_bg do not crash session", {
expect_equal(rx$get_exit_status(), 0)

expect_equal(rx$get_result(), 2)
processx::processx_conn_close(rx$get_output_connection())
processx::processx_conn_close(rx$get_error_connection())
gc()
})

0 comments on commit 2c343f0

Please sign in to comment.