You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing the following issue (at least up to the v6.0.0 release) when interrupting Plutip tests: after pressing Ctrl+C I see this error in the terminal
node:internal/fs/utils:350
throw err;
^
Error: ENOENT: no such file or directory, lstat '/tmp/nix-shell.Od5tH5/kupo-db'
at Object.lstatSync (node:fs:1668:3)
at __node_internal_ (node:internal/fs/utils:825:8)
at Object.rmSync (node:fs:1275:13)
at /home/mike/dev/mlabs/clarity-project/my-ctl-fork/output/Ctl.Internal.Plutip.Spawn/foreign.js:9:39
at ChildProcess.<anonymous> (/home/mike/dev/mlabs/clarity-project/my-ctl-fork/output/Node.ChildProcess/foreign.js:88:40)
at ChildProcess.emit (node:events:517:28)
at ChildProcess._handle.onexit (node:internal/child_process:292:12) {
errno: -2,
syscall: 'lstat',
code: 'ENOENT',
path: '/tmp/nix-shell.XXX/kupo-db'
}
It seems like this is caused by Kupo having two handlers that attempt to delete test directory: one on SIGINT and one on exit. In the case of pressing Ctrl+C, kupo-db is deleted by the on-SIGINT handler, and then the onexit handler fails to delete the nonexistent directory.
Some other consequences I've noticed besides error in the terminal: sometimes I see that directory of test cluster was not deleted from temp directory.
Although, after fixing this issue in some simplest way (e.g. adding try to directory deletion in onexit handler) I'm facing another issue: after pressing Ctrl+C process detaches instead of exiting and test suite runs till completion. I was testing with suite like this
suite::TestPlanM (AffUnit) Unit
suite =do
test
"interruption test-1"$do
withPlutipContractEnv ctcPlutipConfig testDistribution
\env wallet ->dodo
runContractInEnv env $ withKeyWallet wallet do
logInfo' "starting delay 10s - press CTRL + C"
liftAff $ delay (Milliseconds (10000.0::Number))
logInfo' "delay end"
logInfo' "test end"
test
"interruption test -2"$do
withPlutipContractEnv ctcPlutipConfig testDistribution
\env wallet ->dodo
runContractInEnv env $ withKeyWallet wallet do
logInfo' "second test"
and if I press Ctrl+C after "starting delay 10s - press CTRL + C" log message, when delay is over I still see
"delay end" and "test end" messages, as well as execution of "interruption test -2"
The text was updated successfully, but these errors were encountered:
Note, that many cleanups may be performed on the single cleanup handler (since it is not restricted), so you could call cleanup accidentally many times in tests.
However this should not be an issue if cleanup errors are catched well. So my opinion is that here are two issues:
Some errors are killing the cleaner thread before cleanup is completed (which prevents full cleanup)
Tests keep running after SIGINT
First issue can be solved by preventing CTL cleanups from throwing async exceptions.
For instance the one you have experienced: #1619
I'm experiencing the following issue (at least up to the
v6.0.0
release) when interrupting Plutip tests: after pressingCtrl+C
I see this error in the terminalIt seems like this is caused by Kupo having two handlers that attempt to delete test directory: one on
SIGINT
and one on exit. In the case of pressingCtrl+C
,kupo-db
is deleted by the on-SIGINT
handler, and then theonexit
handler fails to delete the nonexistent directory.Some other consequences I've noticed besides error in the terminal: sometimes I see that directory of test cluster was not deleted from temp directory.
Although, after fixing this issue in some simplest way (e.g. adding
try
to directory deletion inonexit
handler) I'm facing another issue: after pressingCtrl+C
process detaches instead of exiting and test suite runs till completion. I was testing with suite like thisand if I press
Ctrl+C
after "starting delay 10s - press CTRL + C" log message, when delay is over I still see"delay end" and "test end" messages, as well as execution of "interruption test -2"
The text was updated successfully, but these errors were encountered: