Merge PR #2285: simulation: Write logs on panic

This commit is contained in:
Dev Ojha
2018-09-11 17:18:58 +08:00
committed by Christopher Goes
parent 2a49406e9b
commit 962b04d985
4 changed files with 67 additions and 20 deletions
+7 -2
View File
@@ -131,7 +131,7 @@ func BenchmarkFullGaiaSimulation(b *testing.B) {
// Run randomized simulation
// TODO parameterize numbers, save for a later PR
simulation.SimulateFromSeed(
err := simulation.SimulateFromSeed(
b, app.BaseApp, appStateFn, seed,
testAndRunTxs(app),
[]simulation.RandSetup{},
@@ -140,6 +140,10 @@ func BenchmarkFullGaiaSimulation(b *testing.B) {
blockSize,
commit,
)
if err != nil {
fmt.Println(err)
b.Fail()
}
if commit {
fmt.Println("GoLevelDB Stats")
fmt.Println(db.Stats()["leveldb.stats"])
@@ -164,7 +168,7 @@ func TestFullGaiaSimulation(t *testing.T) {
require.Equal(t, "GaiaApp", app.Name())
// Run randomized simulation
simulation.SimulateFromSeed(
err := simulation.SimulateFromSeed(
t, app.BaseApp, appStateFn, seed,
testAndRunTxs(app),
[]simulation.RandSetup{},
@@ -176,6 +180,7 @@ func TestFullGaiaSimulation(t *testing.T) {
if commit {
fmt.Println("Database Size", db.Stats()["database.size"])
}
require.Nil(t, err)
}
// TODO: Make another test for the fuzzer itself, which just has noOp txs