Skip to content

Commit

Permalink
Fix Level DB set up, use random directory (#4601) (#4611)
Browse files Browse the repository at this point in the history
* use random dir instead of fixed

* fix compile err

* lint

(cherry picked from commit 1937193)

Co-authored-by: Hieu Vu <72878483+hieuvubk@users.noreply.github.com>
  • Loading branch information
mergify[bot] and hieuvubk authored Mar 14, 2023
1 parent 36123c1 commit ffd3e28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ func Setup(isCheckTx bool) *OsmosisApp {
// SetupTestingAppWithLevelDb initializes a new OsmosisApp intended for testing,
// with LevelDB as a db.
func SetupTestingAppWithLevelDb(isCheckTx bool) (app *OsmosisApp, cleanupFn func()) {
dir := "osmosis_testing"
dir, err := os.MkdirTemp(os.TempDir(), "osmosis_leveldb_testing")
if err != nil {
panic(err)
}
db, err := sdk.NewLevelDB("osmosis_leveldb_testing", dir)
if err != nil {
panic(err)
Expand Down

0 comments on commit ffd3e28

Please sign in to comment.