Skip to content

Commit

Permalink
361 R CMD check consumes a large amount of memory (#363)
Browse files Browse the repository at this point in the history
close #361 

add an `app$stop()` to see if it reduces memory consumption

thank you for the review

Co-authored-by: benoit <[email protected]>
  • Loading branch information
BFalquet and benoit authored Feb 22, 2024
1 parent 29deeaa commit f98dc5f
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/testthat/test-adtteSpec.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ test_that("adtteSpecServer module works as expected in the test app", {
app$wait_for_idle()
res <- app$get_value(output = ns("summary"))
expect_equal(res$message, "please select an endpoint")

app$stop()
})

# nolint end
2 changes: 2 additions & 0 deletions tests/testthat/test-assaySpec.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ test_that("assaySpecServer module works as expected in the test app", {
app$wait_for_idle()
res <- app$get_value(output = ns("result"))
expect_identical(res, "[1] \"\"")

app$stop()
})

# nolint end
2 changes: 2 additions & 0 deletions tests/testthat/test-barplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ test_that("barplot module works as expected in the test app", {

app$wait_for_idle()
app$expect_select_screenshot(ns("plot-plot_out_main"))

app$stop()
})

# nolint end
2 changes: 2 additions & 0 deletions tests/testthat/test-boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ test_that("boxplot module works as expected in the test app", {
app$wait_for_idle()

app$expect_select_screenshot(ns("plot-plot_out_main"))

app$stop()
})

# nolint end
2 changes: 2 additions & 0 deletions tests/testthat/test-experimentSpec.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ test_that("experimentSpec module works as expected in the test app", {

res <- app$get_value(output = ns("summary"))
expect_match(res, "HermesData object with 9 samples of 2500 genes")

app$stop()
})

# nolint end
2 changes: 2 additions & 0 deletions tests/testthat/test-forest.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ test_that("forest_tte module works as expected in the test app", {

app$wait_for_idle()
app$expect_select_screenshot(ns("plot-plot_out_main"))

app$stop()
})

# nolint end
2 changes: 2 additions & 0 deletions tests/testthat/test-geneSpec.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ test_that("geneSpec module works as expected in the test app", {
app$wait_for_idle()
res <- app$get_value(input = ns("my_genes-genes"))
expect_set_equal(res, c("GeneID:10061", "GeneID:28"))

app$stop()
})

# nolint end
1 change: 1 addition & 0 deletions tests/testthat/test-km.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ test_that("km module works as expected in the test app", {
app$wait_for_idle()

app$expect_select_screenshot(ns("plot-plot_out_main"))
app$stop()
})

# nolint end
1 change: 1 addition & 0 deletions tests/testthat/test-pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ test_that("pca module works as expected in the test app", {
app$set_inputs(!!ns("filter_top") := "TRUE")
res <- app$wait_for_value(input = ns("n_top"))
expect_identical(res, 2500L)
app$stop()
})

# nolint end
1 change: 1 addition & 0 deletions tests/testthat/test-quality.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ test_that("quality module works as expected in the test app", {
app$set_inputs(!!ns("plot_type") := "Top Genes Plot")
app$set_inputs(!!ns("assay-name") := "cpm")
app$expect_select_screenshot(ns("plot-plot_out_main"))
app$stop()
})

# nolint end
1 change: 1 addition & 0 deletions tests/testthat/test-sampleVarSpec.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ test_that("sampleVarSpec module works as expected in the test app", {
# Check the output and which levels are reported there.
res <- app$get_value(output = ns("summary"))
expect_match(res, "< 18/>= 18 \n 5 ")
app$stop()
})

# nolint end
2 changes: 2 additions & 0 deletions tests/testthat/test-scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ test_that("scatterplot module works as expected in the test app", {

app$wait_for_idle()
app$expect_select_screenshot(ns("plot-plot_out_main"))

app$stop()
})

# nolint end
1 change: 1 addition & 0 deletions tests/testthat/test-volcanoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ test_that("volcanoplot module works as expected in the test app", {
app$set_inputs(!!ns("log2_fc_thresh") := 8)

app$expect_select_screenshot(ns("plot-plot_out_main"))
app$stop()
})

# nolint end

0 comments on commit f98dc5f

Please sign in to comment.