mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-10 15:01:03 +00:00
Merge branch 'master' into fix-logger
This commit is contained in:
commit
1d102e283d
3 changed files with 1124 additions and 618 deletions
1726
executor_test.go
1726
executor_test.go
File diff suppressed because it is too large
Load diff
|
|
@ -101,6 +101,9 @@ func NewHolder() *Holder {
|
|||
|
||||
// Open initializes the root data directory for the holder.
|
||||
func (h *Holder) Open() error {
|
||||
// Reset closing in case Holder is being reopened.
|
||||
h.closing = make(chan struct{})
|
||||
|
||||
h.setFileLimit()
|
||||
|
||||
h.Logger.Printf("open holder path: %s", h.Path)
|
||||
|
|
@ -178,6 +181,9 @@ func (h *Holder) Close() error {
|
|||
}
|
||||
}
|
||||
|
||||
// Reset opened in case Holder needs to be reopened.
|
||||
h.opened = make(chan struct{})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -287,3 +287,13 @@ func TestHolderCleaner_CleanHolder(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure holder can reopen.
|
||||
func TestHolderCleaner_Reopen(t *testing.T) {
|
||||
h := NewHolder()
|
||||
h.Path = "path"
|
||||
h.Open()
|
||||
h.Close()
|
||||
h.Open()
|
||||
h.Close()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue