fix ut
This commit is contained in:
parent
abd8768aa4
commit
63d80b88b4
|
@ -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)
|
||||
}
|
||||
|
||||
// 测试刷新错误
|
||||
|
|
Loading…
Reference in New Issue