Automatically delete old configs on integration test start.
This commit is contained in:
parent
7ce2e937ab
commit
a0cd4248d9
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
|
||||||
import scala.concurrent.duration.Duration
|
import scala.concurrent.duration.Duration
|
||||||
import scala.concurrent.{Await, Future}
|
import scala.concurrent.{Await, Future}
|
||||||
import scala.util.Try
|
import scala.util.Try
|
||||||
|
import scalax.file.Path
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates some local nodes, connects them and sends messages between them.
|
* Creates some local nodes, connects them and sends messages between them.
|
||||||
|
@ -63,7 +64,7 @@ object Main extends App {
|
||||||
|
|
||||||
private def createNode(index: Int): Future[LocalNode] = {
|
private def createNode(index: Int): Future[LocalNode] = {
|
||||||
val configFolder = new File(s"build/node$index/")
|
val configFolder = new File(s"build/node$index/")
|
||||||
assert(!configFolder.exists(), s"stale config exists in $configFolder")
|
Path(configFolder).deleteRecursively()
|
||||||
Future(new LocalNode(index, configFolder))
|
Future(new LocalNode(index, configFolder))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue