Better formatting for eunit timeouts
- Dominant language
- Gleam
- Stars
- 49
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
Using gleam `1.11.1` and gleeunit `1.6.0` I got a timeout from eunit in an unexpected format:
```
gleeunit.main
An unexpected error occurred:
[Id([1, 1, 7]), Reason(Timeout(dict.from_list([#(Stacktrace, [#(atom.create_from_string("tom@lexer"), Next, 2, [File(charlist.from_string("src/tom/lexer.gleam")), Line(25)]), #(atom.create_from_string("tom@lexer_test"), ToStringTest, 0, [File(charlist.from_string("test/tom/lexer_test.gleam")), Line(40)]), EunitTest(atom.create_from_string("-mf_wrapper/2-fun-0-"), 2, [File(charlist.from_string("eunit_test.erl")), Line(274)]), EunitTest(RunTestfun, 1, [File(charlist.from_string("eunit_test.erl")), Line(72)]), EunitProc(RunTest, 1, [File(charlist.from_string("eunit_proc.erl")), Line(544)]), EunitProc(WithTimeout, 3, [File(charlist.from_string("eunit_proc.erl")), Line(369)]), EunitProc(HandleTest, 2, [File(charlist.from_string("eunit_proc.erl")), Line(527)]), EunitProc(TestsInorder, 3, [File(charlist.from_string("eunit_proc.erl")), Line(469)])])]))), Desc(Undefined), Source(#(atom.create_from_string("tom@lexer_test"), ToStringTest, 0)), Line(0)]
gleeunit.main
An unexpected error occurred:
[Id([1, 1]), Reason(Undefined), Desc("module 'tom@lexer_test'"), Spawn(Undefined), Order(Undefined)]
gleeunit.main
An unexpected error occurred:
[Id([1]), Reason(Undefined), Desc(Undefined), Spawn(Undefined), Order(Undefined)]
gleeunit.main
An unexpected error occurred:
[Id([]), Reason(Blame([1, 1, 7])), Desc(Undefined), Spawn(Undefined), Order(Undefined)]
6 tests, 4 failures
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the timeout through gleeunit.main using the Gleam 1.11.1 and gleeunit 1.6.0 versions and the output shown in the issue. Trace how the timeout is formatted, then verify that the resulting eunit error output is clearer while preserving the reported test and stacktrace information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100