summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Langesten <daniel.langest@gmail.com>2015-03-19 15:08:28 +0100
committerDaniel Langesten <daniel.langest@gmail.com>2015-03-19 15:08:28 +0100
commitf82cfd0281396ae779b897ff27d288054a814547 (patch)
treec4bf1928881e786402c9cfd1bea66dd960af21d6
parentf70a7eeab55db226883d957e3b1e0eb6a6d4d035 (diff)
repaired erronous tests
-rw-r--r--flow-cleaner_test.go4
-rw-r--r--testdata/jsoninput4
2 files changed, 5 insertions, 3 deletions
diff --git a/flow-cleaner_test.go b/flow-cleaner_test.go
index ac8e357..0c01c1c 100644
--- a/flow-cleaner_test.go
+++ b/flow-cleaner_test.go
@@ -35,7 +35,9 @@ func testProcessFromStdin(t *testing.T, cfg *Config) {
go func() {
for i := 0; i < 3; i++ {
fakeStdin(t, stdin)
- //time.Sleep(3 * time.Minute)
+ if i < 2 {
+ time.Sleep(3 * time.Minute)
+ }
}
close(stdin)
}()
diff --git a/testdata/jsoninput b/testdata/jsoninput
index af1f8dc..b2d4a25 100644
--- a/testdata/jsoninput
+++ b/testdata/jsoninput
@@ -10,9 +10,9 @@
----
{"pkt_len_distrib": "200-299", "as_src": 2, "as_dst": 3, "packets": 6, "bytes": 3, "port_dst": 10, "ip_src": "2.2.2.2", "ip_dst": "1.1.1.1", "port_src": 5}
----
-{"pkt_len_distrib": "200-299", "as_src": 2, "as_dst": 3, "packets": 4, "bytes": 3, "port_dst": 10, "ip_src": "2.2.2.2", "ip_dst": "1.1.1.1", "port_src": 5}
-----
{"pkt_len_distrib": "200-299", "as_src": 2, "as_dst": 3, "packets": 1, "bytes": 3, "port_dst": 10, "ip_src": "2.2.2.2", "ip_dst": "1.1.1.1", "port_src": 6}
----
{"pkt_len_distrib": "200-299", "as_src": 2, "as_dst": 3, "packets": 0, "bytes": 3, "port_dst": 11, "ip_src": "2.2.2.2", "ip_dst": "1.1.1.1", "port_src": 6}
----
+{"pkt_len_distrib": "200-299", "as_src": 2, "as_dst": 4, "packets": 4, "bytes": 3, "port_dst": 11, "ip_src": "2.2.2.2", "ip_dst": "1.1.1.1", "port_src": 6}
+----