Skip to content

Commit

Permalink
Merge PR #2227: simulation: Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cwgoes authored Sep 4, 2018
2 parents d736204 + 5ed24e4 commit e783b90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ test_sim_gaia_nondeterminism:

test_sim_gaia_fast:
@echo "Running quick Gaia simulation. This may take several minutes..."
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=50 -v -timeout 24h
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=150 -v -timeout 24h

test_sim_gaia_slow:
@echo "Running full Gaia simulation. This may take awhile!"
Expand Down
9 changes: 5 additions & 4 deletions cmd/gaia/app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func TestAppStateDeterminism(t *testing.T) {
t.Skip("Skipping Gaia simulation")
}

numSeeds := 5
numSeeds := 3
numTimesToRunPerSeed := 5
appHashList := make([]json.RawMessage, numTimesToRunPerSeed)

Expand All @@ -206,10 +206,11 @@ func TestAppStateDeterminism(t *testing.T) {
testAndRunTxs(app),
[]simulation.RandSetup{},
[]simulation.Invariant{},
20,
20,
true,
50,
100,
false,
)
app.Commit()
appHash := app.LastCommitID().Hash
appHashList[j] = appHash
}
Expand Down
2 changes: 1 addition & 1 deletion x/mock/simulation/random_simulate_blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func createBlockSimulator(testingMode bool, tb testing.TB, t *testing.T, event f
AssertAllInvariants(t, app, invariants, log)
}
if opCount%50 == 0 {
fmt.Printf("\rSimulating... block %d/%d, operation %d/%d.", header.Height, totalNumBlocks, opCount, blocksize)
fmt.Printf("\rSimulating... block %d/%d, operation %d/%d. ", header.Height, totalNumBlocks, opCount, blocksize)
}
}
opCount++
Expand Down

0 comments on commit e783b90

Please sign in to comment.