diff options
author | stephan <stephan@noemail.net> | 2023-09-01 17:51:09 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-09-01 17:51:09 +0000 |
commit | 49a40ef6d242e8babc2697fa6b2208b62ebb93de (patch) | |
tree | 8447f6ae796d0b25166a7c4affeda5c9419ae8a0 /ext/wasm/SQLTester | |
parent | a5f425cc6ea78aed239573fe7af1e30c9b844390 (diff) | |
download | sqlite-49a40ef6d242e8babc2697fa6b2208b62ebb93de.tar.gz sqlite-49a40ef6d242e8babc2697fa6b2208b62ebb93de.zip |
Add a timer to the JS SQLTester app to warn if it appears that loading the module has failed, which is commonly caused by the test scripts not being compiled.
FossilOrigin-Name: f9c1f9cad1ad22f689a4afa13d59bf9969ddaed6624cbc16cb1bf5d1fd0c8a5b
Diffstat (limited to 'ext/wasm/SQLTester')
-rw-r--r-- | ext/wasm/SQLTester/index.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/wasm/SQLTester/index.html b/ext/wasm/SQLTester/index.html index cd1423ac3..1dffad63e 100644 --- a/ext/wasm/SQLTester/index.html +++ b/ext/wasm/SQLTester/index.html @@ -96,6 +96,13 @@ logClass('','index.html:',...args); return f; }; + + const timerId = setTimeout( ()=>{ + logClass('error',"The SQLTester module is taking an unusually ", + "long time to load. More information may be available", + "in the dev console."); + }, 3000 /* assuming localhost */ ); + W.onmessage = function({data}){ switch(data.type){ case 'stdout': log2(data.payload.message); break; @@ -105,6 +112,7 @@ log("test results:",data.payload); break; case 'is-ready': + clearTimeout(timerId); runTests(); break; default: log("unhandled onmessage",data); |