Refactor trace package tests for improved readability
- Removed unnecessary blank lines in multiple test files to enhance code clarity and maintainability. - Adjusted formatting in `subscription.go`, `trace_bench_test.go`, `trace_concurrent_test.go`, `trace_mem_test.go`, `trace_node_test.go`, `trace_space_test.go`, and `trace_subscription_test.go` for consistency.
This commit is contained in:
parent
3a46d98663
commit
a7210f027f
7 changed files with 13 additions and 19 deletions
|
|
@ -491,4 +491,3 @@ func getTraceScenarios() []traceScenario {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -282,4 +282,3 @@ func TestConcurrentLogging(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -618,4 +618,3 @@ func TestGoroutineLeak(t *testing.T) {
|
|||
t.Logf("✓ No goroutine leak detected")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -211,4 +211,3 @@ func TestCompleteWithOutput(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,11 +176,10 @@ func TestSpaceGetSpace(t *testing.T) {
|
|||
assert.Equal(t, "Test description", retrieved.Description)
|
||||
assert.Equal(t, int64(7200), retrieved.TTL)
|
||||
|
||||
// Get non-existent space (returns nil, nil)
|
||||
nonExistent, err := manager.GetSpace("nonexistent")
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, nonExistent)
|
||||
// Get non-existent space (returns nil, nil)
|
||||
nonExistent, err := manager.GetSpace("nonexistent")
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, nonExistent)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,15 +153,15 @@ func TestSubscribeFrom(t *testing.T) {
|
|||
// Channel closed
|
||||
break collectLoop
|
||||
}
|
||||
receivedUpdates = append(receivedUpdates, update)
|
||||
// Check if we received step 2 events
|
||||
if update.Type == types.UpdateTypeNodeStart {
|
||||
if data, ok := update.Data.(*types.NodeStartData); ok {
|
||||
if data.Node != nil && data.Node.Label == "Finalizing" {
|
||||
foundStep2 = true
|
||||
receivedUpdates = append(receivedUpdates, update)
|
||||
// Check if we received step 2 events
|
||||
if update.Type == types.UpdateTypeNodeStart {
|
||||
if data, ok := update.Data.(*types.NodeStartData); ok {
|
||||
if data.Node != nil && data.Node.Label == "Finalizing" {
|
||||
foundStep2 = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Stop after receiving trace_complete
|
||||
if update.Type == types.UpdateTypeComplete {
|
||||
break collectLoop
|
||||
|
|
@ -280,4 +280,3 @@ func TestMultipleSubscribers(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue