increase timeout on travis
This commit is contained in:
		| @@ -1,7 +1,9 @@ | |||||||
| package registry | package registry | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
|  | 	"os" | ||||||
| 	"testing" | 	"testing" | ||||||
|  | 	"time" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func TestWatcher(t *testing.T) { | func TestWatcher(t *testing.T) { | ||||||
| @@ -76,8 +78,16 @@ func TestWatcher(t *testing.T) { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	travis := os.Getenv("TRAVIS") | ||||||
|  |  | ||||||
|  | 	var opts []Option | ||||||
|  |  | ||||||
|  | 	if travis == "true" { | ||||||
|  | 		opts = append(opts, Timeout(time.Millisecond*100)) | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	// new registry | 	// new registry | ||||||
| 	r := NewRegistry() | 	r := NewRegistry(opts...) | ||||||
|  |  | ||||||
| 	w, err := r.Watch() | 	w, err := r.Watch() | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user