Tests[SendWithPriority]
This commit is contained in:
@@ -147,8 +147,15 @@ func TestFailErr(t *testing.T, e error) {
|
||||
}
|
||||
|
||||
func unpointer(v any) any {
|
||||
if v == nil {
|
||||
return v
|
||||
}
|
||||
|
||||
val := reflect.ValueOf(v)
|
||||
if val.Kind() == reflect.Ptr {
|
||||
if val.IsNil() {
|
||||
return v
|
||||
}
|
||||
val = val.Elem()
|
||||
return unpointer(val.Interface())
|
||||
}
|
||||
|
||||
@@ -102,6 +102,8 @@ func StartSimpleWebserver(t *testing.T) (*logic.Application, func()) {
|
||||
|
||||
stop := func() { app.Stop(); _ = os.Remove(dbfile) }
|
||||
go func() { app.Run() }()
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
time.Sleep(100 * time.Millisecond) // wait until http server is up
|
||||
|
||||
return app, stop
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user