|
@@ -1,6 +1,7 @@
|
|
package plugins
|
|
package plugins
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
+ "errors"
|
|
"path/filepath"
|
|
"path/filepath"
|
|
"runtime"
|
|
"runtime"
|
|
"sync"
|
|
"sync"
|
|
@@ -20,6 +21,12 @@ func TestPluginAddHandler(t *testing.T) {
|
|
testActive(t, p)
|
|
testActive(t, p)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func TestPluginWaitBadPlugin(t *testing.T) {
|
|
|
|
+ p := &Plugin{activateWait: sync.NewCond(&sync.Mutex{})}
|
|
|
|
+ p.activateErr = errors.New("some junk happened")
|
|
|
|
+ testActive(t, p)
|
|
|
|
+}
|
|
|
|
+
|
|
func testActive(t *testing.T, p *Plugin) {
|
|
func testActive(t *testing.T, p *Plugin) {
|
|
done := make(chan struct{})
|
|
done := make(chan struct{})
|
|
go func() {
|
|
go func() {
|