File tree Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -17,15 +17,10 @@ limitations under the License.
17
17
package systemlogmonitor
18
18
19
19
import (
20
- "fmt"
21
20
"reflect"
22
- "runtime"
23
21
"testing"
24
22
"time"
25
23
26
- "github.com/stretchr/testify/assert"
27
-
28
- watchertest "k8s.io/node-problem-detector/pkg/systemlogmonitor/logwatchers/testing"
29
24
logtypes "k8s.io/node-problem-detector/pkg/systemlogmonitor/types"
30
25
"k8s.io/node-problem-detector/pkg/types"
31
26
"k8s.io/node-problem-detector/pkg/util"
@@ -143,13 +138,3 @@ func TestGenerateStatus(t *testing.T) {
143
138
}
144
139
}
145
140
}
146
-
147
- func TestGoroutineLeak (t * testing.T ) {
148
- orignal := runtime .NumGoroutine ()
149
- f := watchertest .NewFakeLogWatcher (10 )
150
- f .InjectError (fmt .Errorf ("unexpected error" ))
151
- l := & logMonitor {watcher : f }
152
- _ , err := l .Start ()
153
- assert .Error (t , err )
154
- assert .Equal (t , orignal , runtime .NumGoroutine ())
155
- }
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ package filelog
19
19
import (
20
20
"io/ioutil"
21
21
"os"
22
- "runtime"
23
22
"testing"
24
23
"time"
25
24
@@ -180,16 +179,3 @@ Jan 2 03:04:05 kernel: [2.000000] 3
180
179
}
181
180
}
182
181
}
183
-
184
- func TestGoroutineLeak (t * testing.T ) {
185
- orignal := runtime .NumGoroutine ()
186
- w := NewSyslogWatcherOrDie (types.WatcherConfig {
187
- Plugin : "filelog" ,
188
- PluginConfig : getTestPluginConfig (),
189
- LogPath : "/not/exist/path" ,
190
- Lookback : "10m" ,
191
- })
192
- _ , err := w .Watch ()
193
- assert .Error (t , err )
194
- assert .Equal (t , orignal , runtime .NumGoroutine ())
195
- }
You can’t perform that action at this time.
0 commit comments