Skip to content

Commit d42c87a

Browse files
committed
Fix test
1 parent 11cf0c8 commit d42c87a

File tree

2 files changed

+7
-5
lines changed
  • jupyter-lib/shared-compiler/src/main/kotlin/org/jetbrains/kotlinx/jupyter/config
  • src/test/kotlin/org/jetbrains/kotlinx/jupyter/test

2 files changed

+7
-5
lines changed

jupyter-lib/shared-compiler/src/main/kotlin/org/jetbrains/kotlinx/jupyter/config/logging.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ fun Logger.errorForUser(message: String, throwable: Throwable? = null) {
2323
fun <T> Logger.catchAll(msg: String = "", body: () -> T): T? = try {
2424
body()
2525
} catch (e: Throwable) {
26-
this.error(msg, e)
26+
this.errorForUser(msg, e)
2727
null
2828
}

src/test/kotlin/org/jetbrains/kotlinx/jupyter/test/executeTests.kt

+6-4
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,18 @@ class ExecuteTests : KernelServerTestsBase() {
262262

263263
@Test
264264
fun testLibraryLoadingErrors() {
265-
doExecute("%output --max-buffer=100000 --max-buffer-newline=10000 --max-time=10000", false)
266-
267265
doExecute(
268-
"%use dataframe(0.7.2-dev-144-0.8.3.224)",
266+
"""
267+
USE {
268+
import("xyz.ods")
269+
}
270+
""".trimIndent(),
269271
false,
270272
ioPubChecker = {
271273
val msg = it.receiveMessage()
272274
assertEquals(MessageType.STREAM, msg.type)
273275
val msgText = (msg.content as StreamResponse).text
274-
assertTrue("[ERROR] Failed to load library" in msgText)
276+
assertTrue("The problem is found in one of the loaded libraries" in msgText)
275277
}
276278
)
277279
}

0 commit comments

Comments
 (0)