miraclesu
a7f9b4b6fc
Fixed stop hang & stop err
2013-09-23 15:03:51 +08:00
QLeelulu
1a8af20665
add tail.Tell's test
2013-08-24 15:43:25 +08:00
Sridhar Ratnakumar
275e6442bd
tests for the new Location spec
2013-08-09 14:57:38 -07:00
Sridhar Ratnakumar
b2509e165e
option to limit the rate of reading lines from files
2013-07-11 17:28:18 -07:00
Sridhar Ratnakumar
f461ddc97d
support Follow=false
2013-05-30 13:18:46 -07:00
Sridhar Ratnakumar
de27e252a7
truncate tests should not use ReOpen
2013-05-29 15:08:10 -07:00
Sridhar Ratnakumar
7599e3efb9
fix tail.Stop blocking when called in midst of re-opening
...
this is what caused the test to hang occasionally. after this fix,
test completes in 2mins all the time.
closes issue #4
2013-05-28 19:35:12 -07:00
Sridhar Ratnakumar
0f67bc352f
make watch.go its own package
...
for the purpose for upcoming changes to the watch functionality.
2013-05-28 16:37:21 -07:00
Sridhar Ratnakumar
976fc15b81
update change log, gofmt and remove debug prints
2013-05-28 14:01:32 -07:00
Sridhar Ratnakumar
644891ebbc
BlockUntilExists should return immediately if the file already exists
...
this fixes a potential race condition in the use of BlockUntilExists
following a file existence check (as we do in tail.go:reopen).
closes issue 5
2013-05-28 13:29:40 -07:00
Sridhar Ratnakumar
fb37e0b7ca
use a smaller poll duration for faster test runs
2013-05-28 12:55:11 -07:00
Sridhar Ratnakumar
8c443fb067
fix truncation tests
...
* use O_TRUNC to actually truncate
* use longer initial data before truncating
truncated and updated file is expected to be of smaller size, else
truncation detection won't work.
ref: https://github.com/josegonzalez/beaver/pull/67/files
2013-05-28 12:28:56 -07:00
Sridhar Ratnakumar
e9c3c07fbb
add (failing) tests for copytruncate detection
2013-05-28 11:46:49 -07:00
Sridhar Ratnakumar
ec461b87f0
implement PollingFileWatcher.BlockUntilExists
2013-05-27 15:34:50 -07:00
Sridhar Ratnakumar
c5073c7f26
PollingFileWatcher.ChangeEvents must detect file deletion/rename
2013-05-27 15:34:50 -07:00
Sridhar Ratnakumar
e895d422e1
run TestReOpen with both poll = true and false
...
this catches a bug with log rotation when using polling file watcher.
2013-05-27 15:32:49 -07:00
Sridhar Ratnakumar
0449e85ca5
add license and copyright
2013-01-07 12:54:49 -08:00
Sridhar Ratnakumar
1a694c85a6
test refactoring: use struct embedding to reuse semantics
2012-10-13 13:04:50 -07:00
Sridhar Ratnakumar
b8bf75b80a
MaxLineSize now splits longer lines without discarding the rest
...
implements http://bugs.activestate.com/show_bug.cgi?id=95745
2012-10-13 12:50:27 -07:00
Sridhar Ratnakumar
d214cebdfd
test case for "-F" (follow by name)
...
-F mode reopens deleted/ renamed files.
2012-10-13 12:11:50 -07:00
Sridhar Ratnakumar
aa3b7c3413
test: add test for "-n 0"
2012-10-13 12:02:38 -07:00
Sridhar Ratnakumar
df3f97310f
test: fixture workflow to make test functions concise
2012-10-13 11:44:47 -07:00
Sridhar Ratnakumar
4e53f618e2
first test case for tail
...
tests "-n -1"
need to abstract operations for multiple workflow
2012-10-13 11:20:04 -07:00
Sridhar Ratnakumar
4bbf3d28cc
gracefully manage goroutines death using tomb
...
http://blog.labix.org/2011/10/09/death-of-goroutines-under-control
2012-10-12 16:28:22 -07:00
Sridhar Ratnakumar
187dea7196
use struct to configure the growing tail args; start working on unit tests
2012-10-12 14:32:04 -07:00