Skip to content

Commit

Permalink
fix test that failed only during codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Apr 26, 2024
1 parent 2f3eb40 commit 28949ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ jobs:
path: check/*.tar.gz

- name: Install covr
if: runner.os == 'macOS'
if: runner.os == 'Linux'
run: |
remotes::install_cran("covr")
shell: Rscript {0}

- name: Test coverage
if: runner.os == 'macOS'
if: runner.os == 'Linux'
run: covr::codecov()
shell: Rscript {0}

Expand Down
3 changes: 2 additions & 1 deletion R/AdditionalCovariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ getCohortCovariateData <- function(
rowIdField = "row_id",
aggregated,
cohortIds,
covariateSettings
covariateSettings,
...
){

# Some SQL to construct the covariate:
Expand Down
6 changes: 2 additions & 4 deletions tests/testthat/test-UploadToDatabase.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ connectionRedshift <- DatabaseConnector::createConnectionDetails(
conn <- DatabaseConnector::connect(connectionRedshift)
targetDialect <- 'postgresql'

withr::with_seed(NULL, {
randVar <- rawToChar(as.raw(sample(c(65:90,97:122), 5, replace=T)))
}
)
set.seed(NULL)
randVar <- rawToChar(as.raw(sample(c(65:90,97:122), 5, replace=T)))

appendRandom <- function(x, rand = randVar){
return(paste("plp", rand, x, sep=''))
Expand Down

0 comments on commit 28949ba

Please sign in to comment.