示例#1
0
func withRandomJob(t *testing.T, conn *beanstalk.Conn) *Job {
	id, err := conn.Put([]byte{}, 0, 0, time.Minute*5)
	if err != nil {
		t.Fail()
	}
	return NewJob(conn, "default", id, []byte{})
}