Log panic when exiting (if any) (#11726)
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
bce11b7949
Коммит
e2ef5d7149
@@ -6,6 +6,7 @@ package testlib
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -122,6 +123,10 @@ func (h *MainHelper) Close() error {
|
|||||||
os.RemoveAll(h.testResourcePath)
|
os.RemoveAll(h.testResourcePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
log.Fatalln(r)
|
||||||
|
}
|
||||||
|
|
||||||
os.Exit(h.status)
|
os.Exit(h.status)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user