@@ -26,7 +26,7 @@ func TestWaitForLog(t *testing.T) {
2626 target := NopStrategyTarget {
2727 ReaderCloser : io .NopCloser (bytes .NewReader ([]byte ("docker" ))),
2828 }
29- wg := NewLogStrategy ("docker" ).WithStartupTimeout (100 * time .Microsecond )
29+ wg := NewLogStrategy ("docker" ).WithStartupTimeout (100 * time .Millisecond )
3030 err := wg .WaitUntilReady (context .Background (), target )
3131 if err != nil {
3232 t .Fatal (err )
@@ -39,7 +39,7 @@ func TestWaitForLog(t *testing.T) {
3939 }
4040
4141 // get all words that start with "ip", end with "m" and has a whitespace before the "ip"
42- wg := NewLogStrategy (`\sip[\w]+m` ).WithStartupTimeout (100 * time .Microsecond ).AsRegexp ()
42+ wg := NewLogStrategy (`\sip[\w]+m` ).WithStartupTimeout (100 * time .Millisecond ).AsRegexp ()
4343 err := wg .WaitUntilReady (context .Background (), target )
4444 if err != nil {
4545 t .Fatal (err )
@@ -53,7 +53,7 @@ func TestWaitWithExactNumberOfOccurrences(t *testing.T) {
5353 ReaderCloser : io .NopCloser (bytes .NewReader ([]byte ("kubernetes\r \n docker\n \r docker" ))),
5454 }
5555 wg := NewLogStrategy ("docker" ).
56- WithStartupTimeout (100 * time .Microsecond ).
56+ WithStartupTimeout (100 * time .Millisecond ).
5757 WithOccurrence (2 )
5858 err := wg .WaitUntilReady (context .Background (), target )
5959 if err != nil {
@@ -69,7 +69,7 @@ func TestWaitWithExactNumberOfOccurrences(t *testing.T) {
6969 // get texts from "ip" to the next "m".
7070 // there are three occurrences of this pattern in the string:
7171 // one "ipsum mauris" and two "ipsum dolor sit am"
72- wg := NewLogStrategy (`ip(.*)m` ).WithStartupTimeout (100 * time .Microsecond ).AsRegexp ().WithOccurrence (3 )
72+ wg := NewLogStrategy (`ip(.*)m` ).WithStartupTimeout (100 * time .Millisecond ).AsRegexp ().WithOccurrence (3 )
7373 err := wg .WaitUntilReady (context .Background (), target )
7474 if err != nil {
7575 t .Fatal (err )
@@ -98,7 +98,7 @@ func TestWaitWithExactNumberOfOccurrencesButItWillNeverHappen(t *testing.T) {
9898
9999 // get texts from "ip" to the next "m".
100100 // there are only three occurrences matching
101- wg := NewLogStrategy (`do(.*)ck.+` ).WithStartupTimeout (100 * time .Microsecond ).AsRegexp ().WithOccurrence (4 )
101+ wg := NewLogStrategy (`do(.*)ck.+` ).WithStartupTimeout (100 * time .Millisecond ).AsRegexp ().WithOccurrence (4 )
102102 err := wg .WaitUntilReady (context .Background (), target )
103103 if err == nil {
104104 t .Fatal ("expected error" )
@@ -127,7 +127,7 @@ func TestWaitShouldFailWithExactNumberOfOccurrences(t *testing.T) {
127127
128128 // get "Maecenas".
129129 // there are only one occurrence matching
130- wg := NewLogStrategy (`^Mae[\w]?enas\s` ).WithStartupTimeout (100 * time .Microsecond ).AsRegexp ().WithOccurrence (2 )
130+ wg := NewLogStrategy (`^Mae[\w]?enas\s` ).WithStartupTimeout (100 * time .Millisecond ).AsRegexp ().WithOccurrence (2 )
131131 err := wg .WaitUntilReady (context .Background (), target )
132132 if err == nil {
133133 t .Fatal ("expected error" )
0 commit comments