Commit b85d4bb
committed
Remove redundant and racy assertion
The `wait_tagged_idle_count/1` function already performs an assertion
[1] on the idle count, so the final `?assertEqual` is both redundant,
and also apparently racy based on this test failure:
```
::in function couchdb_os_proc_pool:if_no_tagged_process_found_new_must_be_spawned/1 (test/eunit/couchdb_os_proc_pool.erl, line 397)
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71)
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 543)
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 368)
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 526)
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 468)
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 358)
in call from eunit_proc:run_group/2 (eunit_proc.erl, line 582)
**error:{assertEqual,[{module,couchdb_os_proc_pool},
{line,397},
{expression,"idle_count ( )"},
{expected,3},
{value,2}]}
```
It seems that the tagged idle count can also drop from 3 to 2 between
the first and second assertion.
[1] https://github.com/apache/couchdb/blob/main/src/couch/test/eunit/couchdb_os_proc_pool.erl#L6541 parent 2cb7b34 commit b85d4bb
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
397 | | - | |
| 396 | + | |
398 | 397 | | |
399 | 398 | | |
400 | 399 | | |
| |||
0 commit comments