Do not shutdown DB handle from boards product (#22924)

* Do not shutdown DB handle from boards product

```
warn  [2023-04-12 09:16:55.397 +05:30] Failed to save status                         caller="platform/status.go:175" user_id=gt5aricnu7g7xkr4jstfybgmbc error="failed to upsert Status: sql: database is closed"
```

The DB handle is a global object that is finally closed
at a higher layer after all the necessary tasks are finished.
So closing it prematurely, in the boards shutdown phase
is not necessary and can cause failures as observed above.

To fix this, we just remove the shutdown method.

```release-note
NONE
```

* fix tests

```release-note
NONE
```
This commit is contained in:
Agniva De Sarker
2023-04-12 19:10:03 +05:30
committed by GitHub
parent 0190d7dca8
commit 62d758f485
2 changed files with 6 additions and 1 deletions

View File

@@ -388,6 +388,11 @@ func (th *TestHelper) TearDown() {
panic(err)
}
err = th.Server.Store().Shutdown()
if err != nil {
panic(err)
}
os.RemoveAll(th.Server.Config().FilesPath)
if err := os.Remove(th.Server.Config().DBConfigString); err == nil {

View File

@@ -355,7 +355,7 @@ func (s *Server) Shutdown() error {
defer s.logger.Info("Server.Shutdown")
return s.store.Shutdown()
return nil
}
func (s *Server) Config() *config.Configuration {