hpcloud / tail

Go package for reading from continously updated files (tail -f)
MIT License
2.72k stars 504 forks source link

Tests fail on Windows #34

Open bbigras opened 10 years ago

bbigras commented 10 years ago

go version go1.3 windows/amd64 Windows 7 64 bits

Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus. mean The process can't access the file because it's used by another process.

go test
2014/06/26 09:39:29 Waiting for /no/such/file to appear...
2014/06/26 09:39:29 Waiting for _no_such_file to appear...
--- FAIL: TestMaxLineSize (0.10 seconds)
        tail_test.go:356: remove .test/maxlinesize/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
--- FAIL: TestOver4096ByteLine (0.10 seconds)
        tail_test.go:356: remove .test/Over4096ByteLine/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.

--- FAIL: TestOver4096ByteLineWithSetMaxLineSize (0.10 seconds)
        tail_test.go:356: remove .test/Over4096ByteLineMaxLineSize/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre
 processus.
--- FAIL: TestLocationFull (0.10 seconds)
        tail_test.go:356: remove .test/location-full/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
2014/06/26 09:39:29 Stopping tail as file no longer exists: .test/location-full/test.txt
2014/06/26 09:39:29 Re-opening truncated file .test/maxlinesize/test.txt ...
2014/06/26 09:39:29 Successfully reopened truncated .test/maxlinesize/test.txt
2014/06/26 09:39:29 Stopping tail as file no longer exists: .test/Over4096ByteLine/test.txt
2014/06/26 09:39:29 Re-opening truncated file .test/Over4096ByteLineMaxLineSize/test.txt ...
2014/06/26 09:39:29 Successfully reopened truncated .test/Over4096ByteLineMaxLineSize/test.txt
2014/06/26 09:39:29 Seeked .test/location-end/test.txt - &{Offset:0 Whence:2}
--- FAIL: TestLocationEnd (0.20 seconds)
        tail_test.go:356: remove .test/location-end/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
2014/06/26 09:39:30 Re-opening truncated file .test/location-end/test.txt ...
2014/06/26 09:39:30 Successfully reopened truncated .test/location-end/test.txt
2014/06/26 09:39:30 Seeked .test/location-end/test.txt - &{Offset:-6 Whence:2}
--- FAIL: TestLocationMiddle (0.21 seconds)
        tail_test.go:356: remove .test/location-end/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
--- FAIL: TestReOpenInotify (0.10 seconds)
        tail_test.go:356: remove .test/reopen-inotify/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
--- FAIL: TestReOpenPolling (0.30 seconds)
        tail_test.go:356: remove .test/reopen-polling/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
2014/06/26 09:39:30 Re-opening truncated file .test/reseek-inotify/test.txt ...
2014/06/26 09:39:30 Successfully reopened truncated .test/reseek-inotify/test.txt
--- FAIL: TestReSeekInotify (0.20 seconds)
        tail_test.go:356: remove .test/reseek-inotify/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
--- FAIL: TestReSeekPolling (0.20 seconds)
        tail_test.go:356: remove .test/reseek-polling/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
2014/06/26 09:39:31 Leaky bucket full (.test/rate-limiting/test.txt); entering 1s cooloff period.
2014/06/26 09:39:31 Re-opening truncated file .test/reseek-polling/test.txt ...
2014/06/26 09:39:31 Successfully reopened truncated .test/reseek-polling/test.txt
2014/06/26 09:39:32 Leaky bucket full (.test/rate-limiting/test.txt); entering 1s cooloff period.
--- FAIL: TestRateLimiting (1.30 seconds)
        tail_test.go:356: remove .test/rate-limiting/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
2014/06/26 09:39:32 Seeked .test/tell-position/test.txt - &{Offset:0 Whence:0}
2014/06/26 09:39:32 Seeked .test/tell-position/test.txt - &{Offset:12 Whence:0}
--- FAIL: TestTell (0.00 seconds)
        tail_test.go:356: remove .test/tell-position/test.txt: Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus.
FAIL
exit status 1
FAIL    github.com/ActiveState/tail     3.369s
Nino-K commented 8 years ago

@brunoqc have tested the later version of tail? are you still encountering this issue?

bbigras commented 8 years ago

I didn't test since last time. I still have one failed test but it's not the same error.

go version go1.6.2 windows/amd64 Windows 10 64 bits

D:\gopath\src\github.com\hpcloud\tail [master...origin/master]> go test
2016/04/26 16:30:53 Waiting for /no/such/file to appear...
2016/04/26 16:30:53 Waiting for .test/waits-for-file-to-exist/test.txt to appear...
2016/04/26 16:30:53 Waiting for test.txt to appear...
2016/04/26 16:30:53 Waiting for _no_such_file to appear...
2016/04/26 16:30:55 Seeked .test/location-end/test.txt - &{Offset:0 Whence:2}
2016/04/26 16:30:55 Seeked .test/location-middle/test.txt - &{Offset:-6 Whence:2}
--- FAIL: TestReOpenInotify (0.20s)
        tail_test.go:422: open .test/reopen-inotify/test.txt: Accès refusé.
2016/04/26 16:30:56 Re-opening moved/deleted file .test/reopen-polling/test.txt ...
2016/04/26 16:30:56 Waiting for .test/reopen-polling/test.txt to appear...
2016/04/26 16:30:56 Successfully reopened .test/reopen-polling/test.txt
2016/04/26 16:30:57 Re-opening moved/deleted file .test/reopen-polling/test.txt ...
2016/04/26 16:30:57 Waiting for .test/reopen-polling/test.txt to appear...
2016/04/26 16:30:57 Successfully reopened .test/reopen-polling/test.txt
2016/04/26 16:30:57 Re-opening moved/deleted file .test/reopen-polling/test.txt ...
2016/04/26 16:30:57 Waiting for .test/reopen-polling/test.txt to appear...
2016/04/26 16:30:58 Re-opening truncated file .test/reseek-inotify/test.txt ...
2016/04/26 16:30:58 Successfully reopened truncated .test/reseek-inotify/test.txt
2016/04/26 16:30:58 Re-opening truncated file .test/reseek-polling/test.txt ...
2016/04/26 16:30:58 Successfully reopened truncated .test/reseek-polling/test.txt
2016/04/26 16:30:58 Stopping tail as file no longer exists: .test/reseek-polling/test.txt
2016/04/26 16:30:58 Leaky bucket full (.test/rate-limiting/test.txt); entering 1s cooloff period.
2016/04/26 16:30:59 Leaky bucket full (.test/rate-limiting/test.txt); entering 1s cooloff period.
2016/04/26 16:31:00 Seeked .test/tell-position/test.txt - &{Offset:0 Whence:0}
2016/04/26 16:31:00 Seeked .test/tell-position/test.txt - &{Offset:12 Whence:0}
2016/04/26 16:31:00 Waiting for .test/block-until-file-exists/test.txt to appear...
FAIL
exit status 1
FAIL    github.com/hpcloud/tail 7.001s
Nino-K commented 8 years ago

@brunoqc unfortunately you pulled while the build was failing on master. I have fixed that issue now(pull again). Let me know if you are still seeing the failure.

bbigras commented 8 years ago

It seems I have the same result with fff2f2d9e03958ee916ed469d7983be66aa4eb07.

D:\gopath\src\github.com\hpcloud\tail [master...origin/master]> go test
2016/04/27 10:33:57 Waiting for /no/such/file to appear...
2016/04/27 10:33:57 Waiting for .test/waits-for-file-to-exist/test.txt to appear...
2016/04/27 10:33:57 Waiting for test.txt to appear...
2016/04/27 10:33:57 Waiting for _no_such_file to appear...
2016/04/27 10:33:58 Seeked .test/location-end/test.txt - &{Offset:0 Whence:2}
2016/04/27 10:33:58 Seeked .test/location-middle/test.txt - &{Offset:-6 Whence:2}
--- FAIL: TestReOpenInotify (0.22s)
        tail_test.go:425: open .test/reopen-inotify/test.txt: Accès refusé.
2016/04/27 10:33:59 Re-opening moved/deleted file .test/reopen-polling/test.txt ...
2016/04/27 10:33:59 Waiting for .test/reopen-polling/test.txt to appear...
2016/04/27 10:33:59 Successfully reopened .test/reopen-polling/test.txt
2016/04/27 10:33:59 Re-opening moved/deleted file .test/reopen-polling/test.txt ...
2016/04/27 10:33:59 Waiting for .test/reopen-polling/test.txt to appear...
2016/04/27 10:34:00 Successfully reopened .test/reopen-polling/test.txt
2016/04/27 10:34:00 Re-opening moved/deleted file .test/reopen-polling/test.txt ...
2016/04/27 10:34:00 Waiting for .test/reopen-polling/test.txt to appear...
2016/04/27 10:34:01 Re-opening truncated file .test/reseek-inotify/test.txt ...
2016/04/27 10:34:01 Successfully reopened truncated .test/reseek-inotify/test.txt
2016/04/27 10:34:01 Re-opening truncated file .test/reseek-polling/test.txt ...
2016/04/27 10:34:01 Successfully reopened truncated .test/reseek-polling/test.txt
2016/04/27 10:34:01 Stopping tail as file no longer exists: .test/reseek-polling/test.txt
2016/04/27 10:34:01 Leaky bucket full (.test/rate-limiting/test.txt); entering 1s cooloff period.
2016/04/27 10:34:02 Leaky bucket full (.test/rate-limiting/test.txt); entering 1s cooloff period.
2016/04/27 10:34:02 Seeked .test/tell-position/test.txt - &{Offset:0 Whence:0}
2016/04/27 10:34:02 Seeked .test/tell-position/test.txt - &{Offset:12 Whence:0}
2016/04/27 10:34:02 Waiting for .test/block-until-file-exists/test.txt to appear...
FAIL
exit status 1
FAIL    github.com/hpcloud/tail 5.685s
martinlindhe commented 8 years ago

Looking at this one. Having slightly different errors than above, on Win7 x64:

=== RUN   TestWaitsForFileToExist
2016/09/27 16:41:27 Waiting for .test/waits-for-file-to-exist/test.txt to appear...
--- FAIL: TestWaitsForFileToExist (0.11s)
        tail_test.go:497: tail ended with error: tomb: still alive
=== RUN   TestWaitsForFileToExistRelativePath
2016/09/27 16:41:27 Waiting for test.txt to appear...
--- FAIL: TestWaitsForFileToExistRelativePath (0.11s)
        tail_test.go:497: tail ended with error: tomb: still alive
=== RUN   TestReOpenInotify
--- FAIL: TestReOpenInotify (0.22s)
        tail_test.go:425: open .test/reopen-inotify/test.txt: Access is denied.
martinlindhe commented 8 years ago

One general way of improving the windows coverage for non-windows developers is to set up appveyor CI (a windows CI service, free for open source projects)

martinlindhe commented 8 years ago

Tried bumping fsnotify dependency because it contained recent Windows-fixes. No change in test results.