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