|
|
@@ -20,6 +20,7 @@ import (
|
|
|
"math"
|
|
|
"os"
|
|
|
"reflect"
|
|
|
+ "runtime"
|
|
|
"testing"
|
|
|
"time"
|
|
|
|
|
|
@@ -455,7 +456,11 @@ func TestTxnBlockBackendForceCommit(t *testing.T) {
|
|
|
s.TxnEnd(id)
|
|
|
select {
|
|
|
case <-done:
|
|
|
- case <-time.After(time.Second):
|
|
|
+ case <-time.After(5 * time.Second): // wait 5 seconds for CI with slow IO
|
|
|
+ // print out stack traces of all routines if there is a failure
|
|
|
+ stackTrace := make([]byte, 8*1024)
|
|
|
+ n := runtime.Stack(stackTrace, true)
|
|
|
+ t.Error(string(stackTrace[:n]))
|
|
|
t.Fatalf("failed to execute ForceCommit")
|
|
|
}
|
|
|
}
|