Skip to content

Commit 0f88d24

Browse files
committed
test: skip aysnc tests if redis not available
1 parent 6360da5 commit 0f88d24

File tree

6 files changed

+13
-0
lines changed

6 files changed

+13
-0
lines changed

tests/testthat/test_AcqFunctionStochasticCB.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_that("AcqFunctionStochasticCB works in defaults", {
22
skip_on_cran()
33
skip_if_not_installed("rush")
4+
skip_if_not(redis_available())
45
flush_redis()
56

67
rush::rush_plan(n_workers = 1L)
@@ -27,6 +28,7 @@ test_that("AcqFunctionStochasticCB works in defaults", {
2728
test_that("AcqFunctionStochasticCB works with uniform sampling", {
2829
skip_on_cran()
2930
skip_if_not_installed("rush")
31+
skip_if_not(redis_available())
3032
flush_redis()
3133

3234
rush::rush_plan(n_workers = 2L)
@@ -54,6 +56,7 @@ test_that("AcqFunctionStochasticCB works with uniform sampling", {
5456
test_that("AcqFunctionStochasticCB works with exponential sampling", {
5557
skip_on_cran()
5658
skip_if_not_installed("rush")
59+
skip_if_not(redis_available())
5760
flush_redis()
5861

5962
rush::rush_plan(n_workers = 2L)
@@ -82,6 +85,7 @@ test_that("AcqFunctionStochasticCB works with exponential sampling", {
8285
test_that("AcqFunctionStochasticCB works with lambda decay", {
8386
skip_on_cran()
8487
skip_if_not_installed("rush")
88+
skip_if_not(redis_available())
8589
flush_redis()
8690

8791
rush::rush_plan(n_workers = 1L)
@@ -110,6 +114,7 @@ test_that("AcqFunctionStochasticCB works with lambda decay", {
110114
test_that("AcqFunctionStochasticCB works with periodic lambda decay", {
111115
skip_on_cran()
112116
skip_if_not_installed("rush")
117+
skip_if_not(redis_available())
113118
flush_redis()
114119

115120
rush::rush_plan(n_workers = 1L)

tests/testthat/test_AcqFunctionStochasticEI.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_that("AcqFunctionStochasticEI works in defaults", {
22
skip_on_cran()
33
skip_if_not_installed("rush")
4+
skip_if_not(redis_available())
45
flush_redis()
56

67
rush::rush_plan(n_workers = 1L)
@@ -28,6 +29,7 @@ test_that("AcqFunctionStochasticEI works in defaults", {
2829
test_that("AcqFunctionStochasticEI works with multiple workers", {
2930
skip_on_cran()
3031
skip_if_not_installed("rush")
32+
skip_if_not(redis_available())
3133
flush_redis()
3234

3335
rush::rush_plan(n_workers = 2L)
@@ -55,6 +57,7 @@ test_that("AcqFunctionStochasticEI works with multiple workers", {
5557
test_that("AcqFunctionStochasticEI works with periodic epsilon decay", {
5658
skip_on_cran()
5759
skip_if_not_installed("rush")
60+
skip_if_not(redis_available())
5861
flush_redis()
5962

6063
rush::rush_plan(n_workers = 1L)

tests/testthat/test_OptimizerADBO.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_that("OptimizerADBO works in defaults", {
22
skip_on_cran()
33
skip_if_not_installed("rush")
4+
skip_if_not(redis_available())
45
flush_redis()
56

67
rush::rush_plan(n_workers = 2L)

tests/testthat/test_OptimizerAsyncMbo.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_that("OptimizerAsyncMbo works in defaults", {
22
skip_on_cran()
33
skip_if_not_installed("rush")
4+
skip_if_not(redis_available())
45
flush_redis()
56

67
rush::rush_plan(n_workers = 2L)
@@ -21,6 +22,7 @@ test_that("OptimizerAsyncMbo works in defaults", {
2122
test_that("OptimizerAsyncMbo works with evaluations in archive", {
2223
skip_on_cran()
2324
skip_if_not_installed("rush")
25+
skip_if_not(redis_available())
2426
flush_redis()
2527

2628
rush::rush_plan(n_workers = 2L)

tests/testthat/test_TunerADBO.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_that("TunerADBO works", {
22
skip_on_cran()
33
skip_if_not_installed("rush")
4+
skip_if_not(redis_available())
45
flush_redis()
56

67
learner = lrn("classif.rpart",

tests/testthat/test_TunerAsyncMbo.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_that("TunerAsyncMbo works", {
22
skip_on_cran()
33
skip_if_not_installed("rush")
4+
skip_if_not(redis_available())
45
flush_redis()
56

67
learner = lrn("classif.rpart",

0 commit comments

Comments
 (0)