From fd09f2c9b9adfc76458d5320a33a227ae7e8f4d2 Mon Sep 17 00:00:00 2001 From: jorainer Date: Wed, 3 Apr 2024 11:43:34 +0200 Subject: [PATCH] tests: disable parallel processing in unit tests --- tests/testthat.R | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/testthat.R b/tests/testthat.R index a3f2a3018..015120e3e 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -3,14 +3,8 @@ library(xcms) library(faahKO) library(MSnbase) library(msdata) - -if (.Platform$OS.type == "unix") { - prm <- MulticoreParam(3) -} else { - # prm <- SnowParam(3) - prm <- SerialParam() -} -register(bpstart(prm)) +library(BiocParallel) +register(SerialParam()) ## Create some objects we can re-use in different tests: faahko_3_files <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"), @@ -19,7 +13,7 @@ faahko_3_files <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"), cwp <- CentWaveParam(noise = 10000, snthresh = 40, prefilter = c(3, 10000)) faahko_od <- readMSData(faahko_3_files, mode = "onDisk") -faahko_xod <- findChromPeaks(faahko_od, param = cwp) +faahko_xod <- findChromPeaks(faahko_od, param = cwp, BPPARAM = SerialParam()) od_x <- faahko_od mzr <- matrix(c(335, 335, 344, 344), ncol = 2, byrow = TRUE) od_chrs <- chromatogram(od_x, mz = mzr)