Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected, flakey, test failure #1199

Closed
krader1961 opened this issue Dec 21, 2020 · 2 comments
Closed

Unexpected, flakey, test failure #1199

krader1961 opened this issue Dec 21, 2020 · 2 comments

Comments

@krader1961
Copy link
Contributor

While working on issue #1132 I ran the unit tests and observed the following unexpected failure. Repeating the test succeeded. The change I made to implement a printf builtin should not (can not?) affect the behavior of the failing unit test. Since I've never seen this failure before, and cannot reproduce the failure, it is presumably an extremely rare race condition.

--- FAIL: TestLocationAddon_Workspace (0.35s)
    listing_nonwindows_test.go:73: Wanted buffer not shown
    listing_nonwindows_test.go:73: Want: Width = 50, Dot = (0, 11)
        ┌──────────────────────────────────────────────────┐
        │~/ws1/bin> $                                      │
        └──────────────────────────────────────────────────┘
    listing_nonwindows_test.go:73: Last buffer: Width = 50, Dot = (1, 11)
        ┌──────────────────────────────────────────────────┐
        │~/ws1/tmp> $                                      │
        │ LOCATION  $                                      │
        │ 10 ws/bin                                        │
        │ 10 /usr/bin$                                     │
        └──────────────────────────────────────────────────┘
FAIL
coverage: 83.5% of statements
FAIL    github.com/elves/elvish/pkg/edit        6.645s
@krader1961
Copy link
Contributor Author

I also regularly see what I think is essentially the same unit test failure. Such as this example that occurred on Linux and BSD a few minutes ago while testing an unrelated change:

--- FAIL: TestNavigation_EnterDoesNothingInEmptyDir (0.34s)
    navigation_test.go:135: Wanted buffer not shown
    navigation_test.go:135: Want: Width = 50, Dot = (0, 10)
        ┌──────────────────────────────────────────────────┐
        │~/d/e> put$                                       │
        │ NAVIGATING  $                                    │
        │ a                        $                       │
        │ e    $                                           │
        └──────────────────────────────────────────────────┘
    navigation_test.go:135: Last buffer: Width = 50, Dot = (0, 7)
        ┌──────────────────────────────────────────────────┐
        │~/d> pu$                                          │
        │ NAVIGATING  $                                    │
        │ a                        $                       │
        │ e    $                                           │
        └──────────────────────────────────────────────────┘
FAIL
FAIL    src.elv.sh/pkg/edit     6.428s

@krader1961
Copy link
Contributor Author

Closing because I see many failures of this type on an infrequent basis and it's not clear this issue is actionable. There are lots of issues that are more important to resolve than an infrequent unit test failure due to an apparent race of some sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant