Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Sep 5, 2024
1 parent 3c22a2e commit 03d33ac
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ import org.scalatest.funsuite.AnyFunSuite

class VeloxListenerApiSuite extends AnyFunSuite {
test("Unsupported arch") {
val arch = System.getProperty("os.arch")
System.setProperty("os.arch", "unknown-arch")
val api = new VeloxListenerApi()
val error = intercept[RuntimeException] {
api.onDriverStart(
VeloxBackendTestBase.mockSparkContext(),
VeloxBackendTestBase.mockPluginContext())
try {
val api = new VeloxListenerApi()
val error = intercept[RuntimeException] {
api.onDriverStart(
VeloxBackendTestBase.mockSparkContext(),
VeloxBackendTestBase.mockPluginContext())
}
assert(error.getMessage.contains("FileNotFoundException"))
assert(error.getMessage.contains("unknown-arch/libgluten.so"))
} finally {
System.setProperty("os.arch", arch)
}
assert(error.getMessage.contains("FileNotFoundException"))
assert(error.getMessage.contains("unknown-arch/libgluten.so"))
}
}

0 comments on commit 03d33ac

Please sign in to comment.