mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-23 22:15:47 +00:00
fix: closing leveldb for each test case
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
c85c4f53b3
commit
dbc2767b5b
@ -25,6 +25,8 @@ func TestGMonitorActiveParticipants(t *testing.T) {
|
||||
monitor.LazyLoadMonitorMQTTClient()
|
||||
cfg := config.GetConfig()
|
||||
db, err := leveldb.OpenFile("./activeActors.db", nil)
|
||||
defer db.Close()
|
||||
|
||||
assert.NoError(t, err)
|
||||
mqttMonitor := monitor.NewMqttMonitorService(db, *cfg)
|
||||
err = mqttMonitor.Start()
|
||||
@ -42,6 +44,7 @@ func TestGMonitorActiveParticipants(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, challenger, "plmnt")
|
||||
assert.Contains(t, challengee, "plmnt")
|
||||
|
||||
}
|
||||
|
||||
func TestCleanupRemoval(t *testing.T) {
|
||||
@ -49,6 +52,7 @@ func TestCleanupRemoval(t *testing.T) {
|
||||
|
||||
cfg := config.GetConfig()
|
||||
db, err := leveldb.OpenFile("./activeActors.db", nil)
|
||||
defer db.Close()
|
||||
assert.NoError(t, err)
|
||||
mqttMonitor := monitor.NewMqttMonitorService(db, *cfg)
|
||||
err = mqttMonitor.Start()
|
||||
@ -74,6 +78,7 @@ func TestCleanupPrecisionTest(t *testing.T) {
|
||||
|
||||
cfg := config.GetConfig()
|
||||
db, err := leveldb.OpenFile("./activeActors.db", nil)
|
||||
defer db.Close()
|
||||
assert.NoError(t, err)
|
||||
mqttMonitor := monitor.NewMqttMonitorService(db, *cfg)
|
||||
err = mqttMonitor.Start()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user