Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
Mohammed Al Sahaf 2025-08-03 03:54:48 +03:00
parent 07ad9534fb
commit 9f586657e8
No known key found for this signature in database
2 changed files with 15 additions and 18 deletions

View File

@ -122,7 +122,6 @@ func TestPreferOrder(t *testing.T) {
} }
} }
func TestValidate(t *testing.T) { func TestValidate(t *testing.T) {
type testCase struct { type testCase struct {
name string name string

View File

@ -1046,10 +1046,10 @@ func TestNetWriter_WALBufferingDuringOutage(t *testing.T) {
// Create and provision NetWriter // Create and provision NetWriter
nw := &NetWriter{ nw := &NetWriter{
Address: server.addr, Address: server.addr,
DialTimeout: caddy.Duration(2 * time.Second), DialTimeout: caddy.Duration(2 * time.Second),
ReconnectInterval: caddy.Duration(1 * time.Second), // Short reconnect interval for testing ReconnectInterval: caddy.Duration(1 * time.Second), // Short reconnect interval for testing
SoftStart: true, SoftStart: true,
} }
ctx := caddy.Context{ ctx := caddy.Context{
@ -1117,8 +1117,6 @@ func TestNetWriter_WALBufferingDuringOutage(t *testing.T) {
t.Fatalf("WAL directory was not created: %s", walDir) t.Fatalf("WAL directory was not created: %s", walDir)
} }
// Store outage messages that might have been received before failure // Store outage messages that might have been received before failure
server.mu.RLock() server.mu.RLock()
preRestartMessages := append([]string(nil), server.messages...) preRestartMessages := append([]string(nil), server.messages...)