forked from yuxh/gearman-go
		
	fixed the test
This commit is contained in:
		
							parent
							
								
									ecbc4f5945
								
							
						
					
					
						commit
						f1d7cdee50
					
				@ -15,7 +15,7 @@ func TestAddServer(t *testing.T) {
 | 
				
			|||||||
    if err := worker.AddServer("127.0.0.1:4730"); err != nil {
 | 
					    if err := worker.AddServer("127.0.0.1:4730"); err != nil {
 | 
				
			||||||
        t.Error(err)
 | 
					        t.Error(err)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    if l := len(worker.servers); l != 1 {
 | 
					    if l := len(worker.servers); l != 1 {
 | 
				
			||||||
        t.Log(worker.servers)
 | 
					        t.Log(worker.servers)
 | 
				
			||||||
        t.Error("The length of server list should be 1.")
 | 
					        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) {
 | 
					func TestClose(t *testing.T) {
 | 
				
			||||||
    if err := worker.Close(); err != nil {
 | 
					    if err := worker.Close(); err != nil {
 | 
				
			||||||
        t.Error(err)
 | 
					        t.Error(err)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user