diff --git a/R/sparkR-mosaic/sparkrMosaic/tests/testthat/testVectorFunctions.R b/R/sparkR-mosaic/sparkrMosaic/tests/testthat/testVectorFunctions.R index 205aee809..94ba65076 100644 --- a/R/sparkR-mosaic/sparkrMosaic/tests/testthat/testVectorFunctions.R +++ b/R/sparkR-mosaic/sparkrMosaic/tests/testthat/testVectorFunctions.R @@ -3,7 +3,7 @@ source("data.R") test_that("scalar vector functions behave as intended", { sdf <- SparkR::createDataFrame( data.frame( - wkt = "POLYGON ((0 0, 0 2, 1 2, 1 0, 0 0))", + wkt = "POLYGON ((2 1, 1 2, 2 3, 2 1))", point_wkt = "POINT (1 1)" ) ) diff --git a/R/sparkR-mosaic/tests.R b/R/sparkR-mosaic/tests.R index 375e77a65..3f6eb7109 100644 --- a/R/sparkR-mosaic/tests.R +++ b/R/sparkR-mosaic/tests.R @@ -1,6 +1,7 @@ library(testthat) spark_location <- Sys.getenv("SPARK_HOME") +lib_location <- Sys.getenv("MOSAIC_LIB_PATH") library(SparkR, lib.loc = c(file.path(spark_location, "R", "lib"))) .libPaths(c(file.path(spark_location, "R", "lib"), .libPaths())) @@ -12,7 +13,7 @@ install.packages(package_file, repos=NULL) library(sparkrMosaic) # find the mosaic jar in staging -staging_dir <- "/home/runner/work/mosaic/mosaic/staging/" +staging_dir <- if (lib_location == "") {"/home/runner/work/mosaic/mosaic/staging/"} else {lib_location} mosaic_jar <- list.files(staging_dir) mosaic_jar <- mosaic_jar[grep("jar-with-dependencies.jar", mosaic_jar, fixed=T)] print("Looking for mosaic jar in") diff --git a/R/sparklyr-mosaic/sparklyrMosaic/tests/testthat/testVectorFunctions.R b/R/sparklyr-mosaic/sparklyrMosaic/tests/testthat/testVectorFunctions.R index 2b0416ddd..e2c2ac032 100644 --- a/R/sparklyr-mosaic/sparklyrMosaic/tests/testthat/testVectorFunctions.R +++ b/R/sparklyr-mosaic/sparklyrMosaic/tests/testthat/testVectorFunctions.R @@ -5,7 +5,7 @@ test_that("scalar vector functions behave as intended", { sdf <- sdf_copy_to( sc, data.frame( - wkt = "POLYGON ((0 0, 0 2, 1 2, 1 0, 0 0))", + wkt = "POLYGON ((2 1, 1 2, 2 3, 2 1))", point_wkt = "POINT (1 1)" ) )