Skip to content

Commit

Permalink
default gc = 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Oct 22, 2024
1 parent 6d23e07 commit c67587a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/class_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ options_class <- R6::R6Class(
self$memory %|||% "persistent"
},
get_garbage_collection = function() {
self$garbage_collection %|||% 0L
self$garbage_collection %|||% 1000L
},
get_deployment = function() {
self$deployment %|||% "worker"
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-class_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ tar_test("memory", {

tar_test("garbage_collection", {
x <- options_init()
expect_equal(x$get_garbage_collection(), 0L)
expect_equal(x$get_garbage_collection(), 1000L)
x$set_garbage_collection(6L)
expect_equal(x$get_garbage_collection(), 6L)
x$reset()
expect_equal(x$get_garbage_collection(), 0L)
expect_equal(x$get_garbage_collection(), 1000L)
expect_error(
x$set_garbage_collection("a"),
class = "tar_condition_validate"
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-tar_option_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ tar_test("memory", {
})

tar_test("garbage_collection", {
expect_equal(tar_option_get("garbage_collection"), 0L)
expect_equal(tar_option_get("garbage_collection"), 1000L)
tar_option_set(garbage_collection = 5L)
expect_equal(tar_option_get("garbage_collection"), 5L)
tar_option_reset()
expect_equal(tar_option_get("garbage_collection"), 0L)
expect_equal(tar_option_get("garbage_collection"), 1000L)
expect_error(
tar_option_set(garbage_collection = "abc"),
class = "tar_condition_validate"
Expand Down

0 comments on commit c67587a

Please sign in to comment.