Skip to content

Commit e466ed2

Browse files
No panic on nwo cleanup (hyperledger-labs#1054)
Signed-off-by: Marcus Brandenburger <[email protected]>
1 parent 5ceb3a6 commit e466ed2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

integration/nwo/fsc/fsc.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ func (p *Platform) PreRun() {
226226
}
227227
}
228228
logger.Infof("Starting DBs for following data sources: [%s]...", logging.Keys(configs))
229-
close, err := postgres2.StartPostgresWithFmt(collections.Values(configs))
229+
closeF, err := postgres2.StartPostgresWithFmt(collections.Values(configs))
230230
gomega.Expect(err).ToNot(gomega.HaveOccurred(), "failed to start dbs")
231-
p.cleanDB = close
231+
p.cleanDB = closeF
232232
}
233233

234234
func (p *Platform) PostRun(bool) {
@@ -326,7 +326,10 @@ func (p *Platform) Cleanup() {
326326
if p.metricsAggregatorProcess != nil {
327327
p.metricsAggregatorProcess.Signal(os.Kill)
328328
}
329-
p.cleanDB()
329+
330+
if p.cleanDB != nil {
331+
p.cleanDB()
332+
}
330333
}
331334

332335
func (p *Platform) CheckTopology() {

0 commit comments

Comments
 (0)