Skip to content

flaky test in dev environment  #24

@amir-arad

Description

@amir-arad

when running tests locally I sometimes get the following:

=== RUN   TestNewTruncatingFileWriterWithAutoTruncateTwice
--- FAIL: TestNewTruncatingFileWriterWithAutoTruncateTwice (0.10s)
    require.go:201: 
        	Error Trace:	truncating_file_writer_test.go:30
        	            				truncating_file_writer_test.go:83
        	Error:      	Not equal: 
        	            	expected: []byte{0x66, 0x6f, 0x6f, 0x66, 0x6f, 0x6f}
        	            	actual  : []byte{0x66, 0x6f, 0x6f}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,3 +1,3 @@
        	            	-([]uint8) (len=6) {
        	            	- 00000000  66 6f 6f 66 6f 6f                                 |foofoo|
        	            	+([]uint8) (len=3) {
        	            	+ 00000000  66 6f 6f                                          |foo|
        	            	 }
        	Test:       	TestNewTruncatingFileWriterWithAutoTruncateTwice


Expected :[]byte{0x66, 0x6f, 0x6f, 0x66, 0x6f, 0x6f}
Actual   :[]byte{0x66, 0x6f, 0x6f}

I happened roughly 1 out of five executions. always after a previous test was forcibly terminated. I am documenting the behavior here for future reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions