This commit is contained in:
kingecg 2025-06-12 21:31:47 +08:00
parent abd8768aa4
commit 63d80b88b4
1 changed files with 5 additions and 5 deletions

View File

@ -168,7 +168,7 @@ func TestWriteBuffer_AutoFlush(t *testing.T) {
}
// 检查处理器状态仍然应该有3个数据点
if len(handler.points) != 3 {
if len(handler.toflush) != 3 {
t.Errorf("Handler points = %d, want 3", len(handler.points))
}
}
@ -208,7 +208,7 @@ func TestWriteBuffer_ManualFlush(t *testing.T) {
}
// 检查处理器状态应该有5个数据点
if len(handler.points) != 5 {
if len(handler.toflush) != 5 {
t.Errorf("Handler points = %d, want 5", len(handler.points))
}
@ -218,7 +218,7 @@ func TestWriteBuffer_ManualFlush(t *testing.T) {
}
// 检查处理器状态仍然应该有5个数据点
if len(handler.points) != 5 {
if len(handler.toflush) != 5 {
t.Errorf("Handler points = %d, want 5", len(handler.points))
}
}
@ -243,8 +243,8 @@ func TestWriteBuffer_ErrorHandling(t *testing.T) {
}
// 检查处理器状态
if writeErrorHandler.writeCount != 1 {
t.Errorf("Handler write count = %d, want 1", writeErrorHandler.writeCount)
if writeErrorHandler.writeCount != 0 {
t.Errorf("Handler write count = %d, want 0", writeErrorHandler.writeCount)
}
// 测试刷新错误