Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
vadiminshakov committed Dec 18, 2023
1 parent 44b5003 commit 46fd8e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ func startnodes(block int, commitType pb.CommitType) func() error {
node.Coordinator = nodes[COORDINATOR_TYPE][1].Nodeaddr
}
// create db dir
failfast(os.Mkdir(node.DBPath, os.FileMode(0777)))
node.DBPath = fmt.Sprintf("%s%s%s", FOLLOWER_BADGER, strconv.Itoa(i), "~")
failfast(os.Mkdir(node.DBPath, os.FileMode(0777)))
// start follower
database, err := db.New(node.DBPath)
failfast(err)
Expand Down Expand Up @@ -346,8 +346,9 @@ func startnodes(block int, commitType pb.CommitType) func() error {
// start coordinators (in two- and three-phase modes)
for i, coordConfig := range nodes[COORDINATOR_TYPE] {
// create db dir
failfast(os.Mkdir(coordConfig.DBPath, os.FileMode(0777)))
coordConfig.DBPath = fmt.Sprintf("%s%s%s", COORDINATOR_BADGER, strconv.Itoa(i), "~")
failfast(os.Mkdir(coordConfig.DBPath, os.FileMode(0777)))

// start coordinator
database, err := db.New(coordConfig.DBPath)
failfast(err)
Expand Down

0 comments on commit 46fd8e7

Please sign in to comment.