Skip to content
This repository was archived by the owner on Dec 7, 2020. It is now read-only.
This repository was archived by the owner on Dec 7, 2020. It is now read-only.

Test function TestGetWithin randomly fails #631

@obdeijn

Description

@obdeijn

Test function TestGetWithin randomly fails

Summary

When I run the test suite using "make test" I sometimes run into the following failing test:

=== RUN   TestGetWithin
    TestGetWithin: utils_test.go:460: 
        	Error Trace:	utils_test.go:460
        	Error:      	Not equal: 
        	            	expected: 359000000000
        	            	actual  : 360000000000
        	Test:       	TestGetWithin

Other times it succeeds:

=== RUN   TestGetWithin
--- PASS: TestGetWithin (0.00s)

Environment

  • OS: Mac OS
  • Kernel: Darwin AEO.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
  • go version 1.14.3
  • Server: none
  • Louketo: tag 10.0.0

Expected Results

I expect the test to always succeed.

Actual Results

The test sometimes succeeds, sometimes fails.

Steps to reproduce

Run the tests a few times (see description above).

Additional Information

Looking a the test, it seems to me like this is a timing issue, which I think is undesirable for a unit test.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions