-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added extended message to h2o.init to help user get around version mi…
…smatch error.
- Loading branch information
1 parent
8923a56
commit a5310d0
Showing
3 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
h2o-r/tests/testdir_misc/runit_GH_6707_init_version_check.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
setwd(normalizePath(dirname( | ||
R.utils::commandArgs(asValues = TRUE)$"f" | ||
))) | ||
source("../../scripts/h2o-r-test-setup.R") | ||
|
||
h2o_init_test <- function() { | ||
e <- tryCatch({ | ||
h2o.init( | ||
strict_version_check = TRUE | ||
) | ||
}, error = function(x) x) | ||
|
||
if (!is.null(e)) { | ||
print(e) | ||
err_message <- e[[1]] | ||
if (!grepl("there is no package called ‘h2o’", err_message)) { # this error can occur for some reason. Getting around it by using this check | ||
expect_true(grepl("To circumvent this error message (not recommended), you can set strict_version_check=False", err_message)) | ||
} | ||
} | ||
} | ||
|
||
doTest("Make sure connection version mismatch error contains new error message.", | ||
h2o_init_test) |