From d88cecc70675e721a017aec1cde5da9deb528567 Mon Sep 17 00:00:00 2001 From: Michael Ackley Date: Wed, 8 Nov 2023 19:13:49 -0600 Subject: [PATCH] Corrects mongo pkg ref in test --- _test/test-server/main.go | 3 ++- store/file/filestore.go | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/_test/test-server/main.go b/_test/test-server/main.go index 635c461a4..b80bd4d6c 100644 --- a/_test/test-server/main.go +++ b/_test/test-server/main.go @@ -16,6 +16,7 @@ import ( field "github.com/quickfixgo/quickfix/gen/field" tag "github.com/quickfixgo/quickfix/gen/tag" "github.com/quickfixgo/quickfix/store/file" + "github.com/quickfixgo/quickfix/store/mongo" ) var router *quickfix.MessageRouter = quickfix.NewMessageRouter() @@ -150,7 +151,7 @@ func main() { appSettings.GlobalSettings().Set(config.MongoStoreReplicaSet, mongoReplicaSet) appSettings.GlobalSettings().Set(config.DynamicSessions, "Y") - acceptor, err = quickfix.NewAcceptor(app, quickfix.NewMongoStoreFactory(appSettings), appSettings, fileLogFactory) + acceptor, err = quickfix.NewAcceptor(app, mongo.NewStoreFactory(appSettings), appSettings, fileLogFactory) case "FILE": fileStoreRootPath := path.Join(os.TempDir(), fmt.Sprintf("FileStoreTestSuite-%d", os.Getpid())) fileStorePath := path.Join(fileStoreRootPath, fmt.Sprintf("%d", time.Now().UnixNano())) diff --git a/store/file/filestore.go b/store/file/filestore.go index 5937c7981..6302fd7d6 100644 --- a/store/file/filestore.go +++ b/store/file/filestore.go @@ -77,9 +77,7 @@ func (f fileStoreFactory) Create(sessionID quickfix.SessionID) (msgStore quickfi dirname, err := sessionSettings.Setting(config.FileStorePath) if err != nil { - if err != nil { return nil, err - } } var fsync bool if sessionSettings.HasSetting(config.FileStoreSync) {