mirror of
https://github.com/logos-storage/logos-storage-go-bindings.git
synced 2026-01-02 05:23:09 +00:00
Merge pull request #15 from codex-storage/fix/prevent-datastore-lock
fix: bump nim codex to prevent datastore lock when closing the Codex client
This commit is contained in:
commit
1cf7fe4407
@ -1,6 +1,8 @@
|
||||
package codex
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCodexVersion(t *testing.T) {
|
||||
config := defaultConfigHelper(t)
|
||||
@ -89,3 +91,33 @@ func TestStorageQuota(t *testing.T) {
|
||||
t.Fatal("expected codex node to be created")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCreateAndDestroyMultipleInstancesWithSameDatadir(t *testing.T) {
|
||||
datadir := t.TempDir()
|
||||
|
||||
config := Config{
|
||||
DataDir: datadir,
|
||||
LogFormat: LogFormatNoColors,
|
||||
MetricsEnabled: false,
|
||||
BlockRetries: 5,
|
||||
}
|
||||
|
||||
for range 2 {
|
||||
node, err := New(config)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create Codex node: %v", err)
|
||||
}
|
||||
|
||||
if err := node.Start(); err != nil {
|
||||
t.Fatalf("Failed to start Codex node: %v", err)
|
||||
}
|
||||
|
||||
if err := node.Stop(); err != nil {
|
||||
t.Fatalf("Failed to stop Codex node: %v", err)
|
||||
}
|
||||
|
||||
if err := node.Destroy(); err != nil {
|
||||
t.Fatalf("Failed to stop Codex node after restart: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
vendor/nim-codex
vendored
2
vendor/nim-codex
vendored
@ -1 +1 @@
|
||||
Subproject commit 5a227dbb561672667c5c0285a417175b5004ddf7
|
||||
Subproject commit c80d44ff93057dd41e8ea3d55bef572eb503dfd2
|
||||
Loading…
x
Reference in New Issue
Block a user