Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap 2994 unit test fix #1396

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ if (rootProject.hasProperty('enablePublish')) {
}

scalaTest {
if (rootProject.hasProperty('native.enabled')) {
environment 'SNAPPY_NATIVE_ENABLED': rootProject.property('native.enabled')
}
dependsOn ':cleanScalaTest'
doFirst {
// cleanup files since scalatest plugin does not honour workingDir yet
Expand Down
26 changes: 13 additions & 13 deletions core/src/test/scala/io/snappydata/CommandLineToolsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -288,25 +288,25 @@ class CommandLineToolsSuite extends SnappyTestRunner {
s"-locators option still displayed in run command's usage text!")
}

ignore("ODBC_FailOverTest_NEWSERVER"){
try {
var scriptPath = s"$snappyNativeTestDir/failoverTest_NewServer.sh"
test("ODBC_FailOverTest_AddServer_BeforeConn") {
val flag = System.getenv("SNAPPY_NATIVE_ENABLED")
if (flag != null && flag.equalsIgnoreCase("true")) {
var scriptPath = s"$snappyNativeTestDir/failoverTest_AddServer_BeforeConn.sh"
var consoleOutput = s"$scriptPath $snappyProductDir $snappyNativeTestDir".!!
assert(consoleOutput.contains("Test executed successfully"),
assert(consoleOutput.contains("Test executed successfully connected to"),
s"FailOver failed $consoleOutput")
} finally {

System.out.println(consoleOutput)
}
}

ignore("ODBC_FailOverTest_NONE"){
try {
var scriptPath = s"$snappyNativeTestDir/failoverTest_None.sh"
test("ODBC_FailOverTest_AddServer_AfterConn") {
val flag = System.getenv("SNAPPY_NATIVE_ENABLED")
if (flag != null && flag.equalsIgnoreCase("true")) {
var scriptPath = s"$snappyNativeTestDir/failoverTest_AddServer_AfterConn.sh"
var consoleOutput = s"$scriptPath $snappyProductDir $snappyNativeTestDir".!!
assert(consoleOutput.contains("Test executed successfully, no failover tried"),
s"There failover tried but failed $consoleOutput")
} finally {

assert(consoleOutput.contains("Test executed successfully connected to"),
s"Failed to create new connection $consoleOutput")
System.out.println(consoleOutput)
}
}
}