io.monitors: change tests to not use unique because it only ever used temp-file.
parent
7c2e8d0fad
commit
f5b31a85c0
|
@ -1,12 +1,11 @@
|
||||||
USING: accessors calendar concurrency.count-downs
|
USING: accessors calendar concurrency.count-downs
|
||||||
concurrency.promises continuations destructors io io.directories
|
concurrency.promises continuations destructors io io.directories
|
||||||
io.directories.hierarchy io.files io.files.temp io.files.unique
|
io.directories.hierarchy io.files io.files.temp io.monitors
|
||||||
io.monitors io.pathnames io.timeouts kernel namespaces sequences
|
io.pathnames io.timeouts kernel namespaces sequences system
|
||||||
system threads tools.test ;
|
threads tools.test ;
|
||||||
IN: io.monitors.tests
|
IN: io.monitors.tests
|
||||||
|
|
||||||
os { windows linux macosx } member? [
|
os { windows linux macosx } member? [
|
||||||
[
|
|
||||||
[
|
[
|
||||||
[ "monitor-test" temp-file delete-tree ] ignore-errors
|
[ "monitor-test" temp-file delete-tree ] ignore-errors
|
||||||
|
|
||||||
|
@ -34,10 +33,8 @@ os { windows linux macosx } member? [
|
||||||
[ t ] [ "monitor-test/a2/a1/a4.txt" temp-file exists? ] unit-test
|
[ t ] [ "monitor-test/a2/a1/a4.txt" temp-file exists? ] unit-test
|
||||||
|
|
||||||
[ ] [ "m" get dispose ] unit-test
|
[ ] [ "m" get dispose ] unit-test
|
||||||
] with-unique-directory delete-tree
|
|
||||||
] with-monitors
|
] with-monitors
|
||||||
|
|
||||||
[
|
|
||||||
[
|
[
|
||||||
[ "monitor-test" temp-file delete-tree ] ignore-errors
|
[ "monitor-test" temp-file delete-tree ] ignore-errors
|
||||||
[ ] [ "monitor-test/xyz" temp-file make-directories ] unit-test
|
[ ] [ "monitor-test/xyz" temp-file make-directories ] unit-test
|
||||||
|
@ -79,7 +76,6 @@ os { windows linux macosx } member? [
|
||||||
! Dispose twice
|
! Dispose twice
|
||||||
[ ] [ "m" get dispose ] unit-test
|
[ ] [ "m" get dispose ] unit-test
|
||||||
[ ] [ "m" get dispose ] unit-test
|
[ ] [ "m" get dispose ] unit-test
|
||||||
] with-unique-directory delete-tree
|
|
||||||
] with-monitors
|
] with-monitors
|
||||||
|
|
||||||
! Out-of-scope disposal should not fail
|
! Out-of-scope disposal should not fail
|
||||||
|
@ -87,7 +83,6 @@ os { windows linux macosx } member? [
|
||||||
[ ] [ [ "" resource-path t <monitor> ] with-monitors dispose ] unit-test
|
[ ] [ [ "" resource-path t <monitor> ] with-monitors dispose ] unit-test
|
||||||
|
|
||||||
! Timeouts
|
! Timeouts
|
||||||
[
|
|
||||||
[
|
[
|
||||||
[ ] [ "monitor-timeout-test" temp-file make-directories ] unit-test
|
[ ] [ "monitor-timeout-test" temp-file make-directories ] unit-test
|
||||||
|
|
||||||
|
@ -102,12 +97,10 @@ os { windows linux macosx } member? [
|
||||||
[ ] [ 100 milliseconds "m" get set-timeout ] unit-test
|
[ ] [ 100 milliseconds "m" get set-timeout ] unit-test
|
||||||
[ [ t ] [ "m" get next-change drop ] while ] must-fail
|
[ [ t ] [ "m" get next-change drop ] while ] must-fail
|
||||||
[ ] [ "m" get dispose ] unit-test
|
[ ] [ "m" get dispose ] unit-test
|
||||||
] with-unique-directory delete-tree
|
|
||||||
] with-monitors
|
] with-monitors
|
||||||
|
|
||||||
! Disposing a monitor should throw an error in any threads
|
! Disposing a monitor should throw an error in any threads
|
||||||
! waiting on notifications
|
! waiting on notifications
|
||||||
[
|
|
||||||
[
|
[
|
||||||
[ ] [
|
[ ] [
|
||||||
<promise> "p" set
|
<promise> "p" set
|
||||||
|
@ -123,6 +116,5 @@ os { windows linux macosx } member? [
|
||||||
[ ] [ 100 milliseconds sleep ] unit-test
|
[ ] [ 100 milliseconds sleep ] unit-test
|
||||||
[ ] [ "m" get dispose ] unit-test
|
[ ] [ "m" get dispose ] unit-test
|
||||||
[ t ] [ "p" get 10 seconds ?promise-timeout already-disposed? ] unit-test
|
[ t ] [ "p" get 10 seconds ?promise-timeout already-disposed? ] unit-test
|
||||||
] with-unique-directory delete-tree
|
|
||||||
] with-monitors
|
] with-monitors
|
||||||
] when
|
] when
|
||||||
|
|
Loading…
Reference in New Issue