MCPcopy Create free account
hub / github.com/hpcloud/tail / TestOver4096ByteLineWithSetMaxLineSize

Function TestOver4096ByteLineWithSetMaxLineSize

tail_test.go:137–149  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

135 tailTest.Cleanup(tail, true)
136}
137func TestOver4096ByteLineWithSetMaxLineSize(t *testing.T) {
138 tailTest := NewTailTest("Over4096ByteLineMaxLineSize", t)
139 testString := strings.Repeat("a", 4097)
140 tailTest.CreateFile("test.txt", "test\n"+testString+"\nhello\nworld\n")
141 tail := tailTest.StartTail("test.txt", Config{Follow: true, Location: nil, MaxLineSize: 4097})
142 go tailTest.VerifyTailOutput(tail, []string{"test", testString, "hello", "world"}, false)
143
144 // Delete after a reasonable delay, to give tail sufficient time
145 // to read all lines.
146 <-time.After(100 * time.Millisecond)
147 tailTest.RemoveFile("test.txt")
148 tailTest.Cleanup(tail, true)
149}
150
151func TestLocationFull(t *testing.T) {
152 tailTest := NewTailTest("location-full", t)

Callers

nothing calls this directly

Calls 6

CreateFileMethod · 0.95
StartTailMethod · 0.95
VerifyTailOutputMethod · 0.95
RemoveFileMethod · 0.95
CleanupMethod · 0.95
NewTailTestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…