From 436bfe40a6e39e9cb5db321aa4be300211666538 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 23 Jul 2018 12:01:59 +0200 Subject: [PATCH] test: Ignore c3 data_types null crashes This gets triggered by the CPUUsage DonutChart in pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx. This seems to be some race condition when switching pages, which supposedly also means "(un)render in React". Cockpit code has no control over this, and it also does not break the user experience, so ignore the exception. See https://github.com/c3js/c3/issues/2187 and simlilar issues https://github.com/bcbcarl/react-c3js/issues/22 or https://github.com/c3js/c3/issues/1205. --- test/common/cdp-driver.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/common/cdp-driver.js b/test/common/cdp-driver.js index 018fbe3ec73..006d1a1bb2e 100755 --- a/test/common/cdp-driver.js +++ b/test/common/cdp-driver.js @@ -83,8 +83,15 @@ function setupLogging(client) { if (details.exception && details.exception.className === "PhWaitCondTimeout") return; - unhandledExceptions.push(details) process.stderr.write(details.description || JSON.stringify(details) + "\n"); + + // ignore c3 crashes (https://github.com/c3js/c3/issues/2187) + if (details.exception && details.exception.description && + details.exception.description.indexOf("TypeError: Cannot read property 'data_types' of null") >= 0 && + details.exception.description.indexOf("/kubernetes.js") >= 0) + return; + + unhandledExceptions.push(details) }); client.Log.enable();