reorder testing functions
This commit is contained in:
parent
909e13a24a
commit
2a2ad553a1
@ -50,5 +50,7 @@ func TestFunction(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
// run service
|
// run service
|
||||||
fn.Run()
|
if err := fn.Run(); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,7 @@ func TestService(t *testing.T) {
|
|||||||
// service.Init()
|
// service.Init()
|
||||||
|
|
||||||
// run service
|
// run service
|
||||||
go service.Run()
|
go func() {
|
||||||
|
|
||||||
// wait for start
|
// wait for start
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
@ -56,4 +55,9 @@ func TestService(t *testing.T) {
|
|||||||
|
|
||||||
// shutdown the service
|
// shutdown the service
|
||||||
cancel()
|
cancel()
|
||||||
|
}()
|
||||||
|
|
||||||
|
if err := service.Run(); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user