diff --git a/src/pkg/gearman/gearman_test.go b/src/pkg/gearman/gearman_test.go index e00f7df..caa7f30 100644 --- a/src/pkg/gearman/gearman_test.go +++ b/src/pkg/gearman/gearman_test.go @@ -15,7 +15,7 @@ func TestAddServer(t *testing.T) { if err := worker.AddServer("127.0.0.1:4730"); err != nil { t.Error(err) } - + if l := len(worker.servers); l != 1 { t.Log(worker.servers) t.Error("The length of server list should be 1.") @@ -43,6 +43,14 @@ func TestEcho(t * testing.T) { } } +func TestResult(t *testing.T) { + if job := worker.Result(); job == nil { + t.Error("Nothing in result.") + } else { + t.Log(job) + } +} + func TestClose(t *testing.T) { if err := worker.Close(); err != nil { t.Error(err)