OLD | NEW |
1 package main | 1 package main |
2 | 2 |
3 import ( | 3 import ( |
4 . "launchpad.net/gocheck" | 4 . "launchpad.net/gocheck" |
5 "launchpad.net/juju-core/cmd" | 5 "launchpad.net/juju-core/cmd" |
6 "launchpad.net/juju-core/environs/dummy" | 6 "launchpad.net/juju-core/environs/dummy" |
7 "launchpad.net/juju-core/juju/testing" | 7 "launchpad.net/juju-core/juju/testing" |
8 "reflect" | 8 "reflect" |
9 "time" | 9 "time" |
10 ) | 10 ) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 for { | 92 for { |
93 select { | 93 select { |
94 case op := <-opc: | 94 case op := <-opc: |
95 for _, k := range kinds { | 95 for _, k := range kinds { |
96 if reflect.TypeOf(op) == reflect.TypeOf(k) { | 96 if reflect.TypeOf(op) == reflect.TypeOf(k) { |
97 return op | 97 return op |
98 } | 98 } |
99 } | 99 } |
100 c.Logf("discarding unknown event %#v", op) | 100 c.Logf("discarding unknown event %#v", op) |
101 case <-time.After(2 * time.Second): | 101 case <-time.After(2 * time.Second): |
102 » » » c.Errorf("time out wating for operation") | 102 » » » c.Fatalf("time out wating for operation") |
103 } | 103 } |
104 } | 104 } |
105 panic("not reached") | 105 panic("not reached") |
106 } | 106 } |
OLD | NEW |