Skip to content

Commit 87f79eb

Browse files
committed
update worker tests to identify EOF
1 parent 0cff9cb commit 87f79eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

internal/worker/main_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ func TestCompressMessageHandler(t *testing.T) {
237237

238238
actualContentBuff := bytes.NewBuffer(actualContentReader)
239239
// verify the size: actualContentBuff ignores EOF so include it back.
240-
if len(content) + 1 != actualContentBuff.Len() {
241-
t.Errorf("Expected compressed content to have length of %d bytes but got %d bytes", actualContentBuff.Len(), len(content) + 1)
240+
if len(content) != actualContentBuff.Len() {
241+
t.Errorf("Expected compressed content to have length of %d bytes but got %d bytes", actualContentBuff.Len(), len(content))
242242
}
243243

244244
// TODO: must have a better check for the content here.
@@ -342,8 +342,8 @@ func TestDecompressMessageHandler(t *testing.T) {
342342

343343
actualContentBuff := bytes.NewBuffer(actualContentReader)
344344
// verify the size: actualContentBuff ignores EOF so include it back.
345-
if len(content) != actualContentBuff.Len() + 1 {
346-
t.Errorf("Expected compressed content to have length of %d bytes but got %d bytes", actualContentBuff.Len() + 1, len(content))
345+
if len(content) != actualContentBuff.Len() {
346+
t.Errorf("Expected compressed content to have length of %d bytes but got %d bytes", actualContentBuff.Len(), len(content))
347347
}
348348

349349
if string(content)+"\n" == actualContentBuff.String() {

0 commit comments

Comments
 (0)