summary refs log tree commit diff stats
path: root/tests/async
Commit message (Collapse)AuthorAgeFilesLines
* Allow `futureLogging` in release builds (#21448)Jake Leahy2023-03-021-0/+6
| | | | | | | * Add test case * Fixes 21447: Keeps stackTrace around when using futureLogging * Remove extra whitespace
* Make async stacktraces less verbose (#21091)Jake Leahy2022-12-152-39/+10
| | | | | | | | | | | | | | | | | | | | | | | * Name iterators something human readable Remove intermediate async procs from stacktraces Clean async traceback message from reraises message * Remove unused import/variable * Fix failing tests Don't add {.stackTrace: off.} to anonymous procs (They already don't appear in stacktrace) * Fix failing tests in pragma category Now check that the nim is a routine type first so we don't run into any assertion defects * Hide stack trace pragma in docs and update doc tests User doesn't need to know if something won't appear so this more becomes verbose noise If this is a bad idea we can always add a `when defined(nimdoc)` switch so we don't add {.stackTrace: off.} to the Future[T] returning proc for docs
* `multisync` now allows tuples in return type (#21074)Jake Leahy2022-12-111-0/+19
| | | | | | | * Add test case * Use .toStrLit() on param node first This means that more complex types are fully rendered
* Implicit return working for async proc (#20933)Jake Leahy2022-12-091-0/+13
| | | | | | | | | | | | | * Implicit return working for asyncdispatch proc Closes #11558 * Test case * Test that return value is actually used * Update tests/async/t11558.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes ptr to cstring warnings[backport] (#20848)ringabout2022-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo * fixes ptr to cstring warnings[backport] * add fixes Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* defaults to ORC (#19972)ringabout2022-09-231-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defaults to Orc * bootstrap using refc * use gc * init orc defines * unregister orc * fix gc * fix commands * add prepareMutation for orc * enable deepcopy for orc * prepareMutation * more fixes * some cases * bug #20081 * partial fixes * partial fixes * fixes command line * more fixes * build Nim with refc * use gc * more fixes * rstore * orc doesn't support threadpool * more shallowCopy * more fixes * fixes unsafeNew * workarounds * small * more fixes * fixes some megatest * tcodegenbugs1 refc * fxies megatest * build nimble with refc * workaround tensordsl tests * replace shallowCopy with move * fixes action * workaround * add todo * fixes important packages * unpublic unregisterArcOrc * fixes cpp * enable windows Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* Better error message and tests for bad await (#19622)huantian2022-04-131-3/+32
| | | | | | | | | | | * Better error message and tests for bad await * Use compiles to check if await is valid * temp: disable windows noasync test * Better error report, simplify test Co-authored-by: flywind <xzsflywind@gmail.com>
* deprecate unsafeAddr; extend addr (#19373)flywind2022-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * deprecate unsafeAddr; extend addr addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr * follow @Vindaar's advice * change the signature of addr * unsafeAddr => addr (stdlib) * Update changelog.md * unsafeAddr => addr (tests) * Revert "unsafeAddr => addr (stdlib)" This reverts commit ab83c99c507048a8396e636bf22d55fdd84d7d1c. * doc changes; thanks to @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* style usages part one (openarray => openArray) (#19321)flywind2022-01-041-2/+2
| | | | | * style usages (openArray) * revert doc changes
* fixes #18858 [backport] (#18868)Andreas Rumpf2021-09-191-0/+1
| | | | | | | * fixes #18858 [backport] * ensure async tests work with --experimental:strictEffects [backport] * ensure async tests work with --experimental:strictEffects [backport]
* make proc names consistent (#18626)flywind2021-08-015-5/+5
| | | | | * rename `endswith` to `endsWith` * rename
* asyncdispatch+stackTraceOverride: fix premature collection (#18039) ↵Ștefan Talpalaru2021-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | [backport:1.2] Copying StackTraceEntry instances when nimStackTraceOverride is defined breaks the link between a cstring field that's supposed to point at another string field in the same object. Sometimes, the original object is garbage collected, that memory region reused for storing other strings, so when the StackTraceEntry copy tries to use its cstring pointer to construct a traceback message, it accesses unrelated strings. This only happens for async tracebacks and this patch prevents that by making sure we only use the string fields when nimStackTraceOverride is defined. Async tracebacks also beautified slightly by getting rid of an extra line that was supposed to be commented out, along with the corresponding debugging output. There's also a micro-optimisation to avoid concatenating two strings just to get their combined length.
* move travis, appveyor, ci.yml.disabled to `unmaintained/` (#17828)Timothee Cour2021-04-241-1/+0
| | | | | | | * move travis, appveyor, ci.yml.disabled to unmaintained * update some mentions of travis, appevyor * fix test
* simplify asyncfutures, asyncmacro (#17633)Timothee Cour2021-04-141-8/+24
|
* close #16786 (#17598)flywind2021-03-311-1/+35
|
* Fix void async in templates (#17562)Ardek Romak2021-03-301-0/+12
| | | | | | | | * Fix https://github.com/nim-lang/Nim/issues/16159 * Add test for async in template * Shorten the expression * Even shorter Co-authored-by: Clyybber <darkmine956@gmail.com>
* use doAssert in tests (#16486)flywind2020-12-287-11/+11
|
* testament spec: remove errmsg alias of errormsg (#16188)Timothee Cour2020-11-291-1/+1
|
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-1/+2
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* fix #9695 asyncmacro: tfuturevar fails when activated [backport: 1.0] (#16090)flywind2020-11-221-5/+0
| | | | | | | * fix asyncmacro * Apply suggestions from code review * Update lib/pure/asyncmacro.nim
* fixes #15804 (#15820)Andreas Rumpf2020-11-022-3/+18
| | | | | | | | | * fixes #15804 * fix the existing test * add the testcase for #15804 Co-authored-by: narimiran <narimiran@disroot.org>
* closureiters: fixes #15243 (#15454) [backport:1.2]Andreas Rumpf2020-10-022-66/+25
| | | | * fixes #15243 [backport:1.2]
* fix #15148 (#15149)flywind2020-08-081-0/+12
| | | | | * fix #15148 Co-authored-by: alaviss <leorize+oss@disroot.org>
* [Backport] Fixes callbacks being dropped on Linux/macOS/BSD. (#15012)Dominik Picheta2020-07-191-0/+67
| | | | | | | | | Fixes #15003. This is a serious bug which occurs when data cannot be read/sent immediately and there are a bunch of other read/write events pending. What happens is that the new events are dropped which results in the case of the reported bug resulted in some data not being sent (!).
* scoped memory management (#14790)Andreas Rumpf2020-07-041-1/+2
| | | | | | | * fixes the regressions * closes #13936 * scope based memory management implemented * enabled tcontrolflow.nim test case * final cleanups
* Fix asyncdispatch drain behavior (#14820) (#14838)Ray Imber2020-06-301-0/+25
| | | | | | | | | | | * Fix asyncdispatch drain behavior (#14820) * Changed test to use asyncCheck instead of discard after code review (#14820) * Added some debug statements to help understand what is happening in Azure. * Removed debug statements and increased timeouts by 1 order of magnitude to account for slow Azure VMs Co-authored-by: Ray Imber <ray@crankuptheamps.com>
* Add test-cases to some fixed issues to close them (#14795)Danil Yarantsev2020-06-241-0/+7
|
* fix #13899 defer now works with async (#14723)Timothee Cour2020-06-191-7/+18
|
* fix #14685 tests/async/t7758.nim flaky (#14721)Timothee Cour2020-06-191-2/+7
| | | | | | | * fix #14685 tests/async/t7758.nim flaky * address comment * address comment
* use check to investigate #14685 flaky tests/async/t7758.nim (#14689)Timothee Cour2020-06-161-2/+3
|
* fix #13166 tioselectors flaky test on freebsd+OSX (#14634)Timothee Cour2020-06-121-4/+5
|
* enable tioselectors on osx; more diagnostic for #13166 (#14625)Timothee Cour2020-06-091-5/+3
|
* fixes #14279 (#14618)Andreas Rumpf2020-06-091-0/+15
|
* fix #14320 (tasyncawait.nim is recently very flaky) + avoid hardcoding ↵Timothee Cour2020-05-135-77/+50
| | | | | | | service ports everywhere + flakyAssert (#14327) * hotfix #14320 tasyncawait.nim is recently very flaky * fix #14327 * add flakyAssert
* discardable async procs are now an error (#14176)hlaaftana2020-05-011-0/+9
| | | | * add discard warning in manual
* fix sendTo and recvFrom in asyncnet (#14154)rockcavera2020-04-301-17/+8
| | | | | | | | | | | | | * added high level sendTo and recvFrom to std/asyncnet; tests were also added. * add .since annotation, a changelog entry and fixed to standard library style guide. * Improved asserts msgs and added notes for use with UDP sockets * pointers removed in parameters and fixes * added .since annotation * minor fixes
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-282-9/+9
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* added high level sendTo and recvFrom to std/asyncnet (UDP functionality) ↵rockcavera2020-04-261-0/+99
| | | | | | | | | (#14109) * added high level sendTo and recvFrom to std/asyncnet; tests were also added. * add .since annotation, a changelog entry and fixed to standard library style guide. * Improved asserts msgs and added notes for use with UDP sockets
* Make await a template (#12085)Alexander Ivanov2020-04-254-2/+39
| | | | | * Make await a template * Generate await inside async/multisync
* Fix #13889 with testcase (#13896) [backport]Clyybber2020-04-061-0/+27
| | | | | | | | | * Fix https://github.com/nim-lang/Nim/issues/13889 * Add testcase * Reduce test time Co-authored-by: Elie Zedeck RANDRIAMIANDRIRAY <elie.zedeck@gmail.com>
* faster CIs (#13803)Miran2020-03-309-34/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ttables: smaller table, 5x speedup * thavlak: less iterations, less loops; 30% speedup * tasyncclosestall: shorter timeout; 35% speedup * gcleak4: less iterations, 2x speedup * ttimes: remove deprecated stuff * tdangerisrelease: remove cpp backend, 3x speedup * tfrexp1: smaller range, 2x speedup * trtree: fix warnings, less iterations, 6x speedup * tasyncawait_cyclebreaker: smaller swarm size; 2x speedup * trealloc: smaller number of iterations; 10x speedup * towned_binary_tree: less iterations, 4x speedup * tclosure: remove unused code, less iterations; 2x speedup * twaitany: less durations; 1.4x speedup * tasync_misc: less iterations, 2x speedup * t8535: smaller sleep, 1.5x speedup * tmanyjoin: smaller sleep, 2x speedup * t12221: shorter sleeps, removed two slower tests; 1.6x speedup * tfuturestream: smaller sleep; 1.5x speedup * growobjcrash: less iterations; 2x speedup * ttryrecv: smaller sleep; 1.5x speedup * treusetvar: less threads; 2x speedup * delete tthreadanalysis2, basically a duplicate of tthreadanalysis * t7758: less iterations, 1.5x speedup * tasyncawait: smaller swarm, less messages; 1.5x speedup * tjsandnativeasync: smaller sleep, 1.5x speedup * tpendingcheck: smaller sleep, 1.5x speedup * remove rodfiles test category * move tseq from its own category to 'collections' category * remove unneeded tests and helpers from 'assert' category * stdlib: merge tbitops2 into tbitops * remove 'trepr2' from 'stdlib' cat * merge 'tstreams' into one file * remove 'tinefficient_const_table' from 'ccbugs' cat * merge 'tcollections_to_string' into 'tcollections' * tblocking_channel: smaller sleep, small speedup * tconvexhull: less iterartions; 1.2x speedup * merge 'tdeepcopy2' into 'tdeepcopy' * merge 'tdisjoint_slice2' into 'tdisjoint_slice1' * tmissing_deepcopy: smaller sequence * tsendtwice: smaller arrays; 5x speedup * remove 'tindexerrorformatbounds' * disable multimethod tests * remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests * koch.nim: bootstrap just with '-d:release', no need for 'csource' * add github workflow for documentation * testament: no need for 8 sub-second decimals
* fix deprecations and other warnings (#13748)Miran2020-03-257-17/+16
|
* fix #12919 tasyncclosestall flaky: Address already in use (#12934)Timothee Cour2019-12-191-1/+3
|
* increase the timeout for 'tasyncclosestall' (#12744)Miran2019-11-261-1/+1
| | | | | | This test is very flaky, this change might help reducing the number of failings (usually solved by restarting the test suite). Refs https://github.com/nim-lang/Nim/pull/12694#issuecomment-557583790
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-2/+2
|
* proof that refcounting can handle Nim's async (#12533)Andreas Rumpf2019-10-281-0/+73
|
* Merge branch 'devel' into IOSelector_unregister_fixDominik Picheta2019-10-221-0/+10
|\
| * Fixed yield in nkCheckedFieldExpr (#12429) [backport]Yuriy Glukhov2019-10-151-0/+10
| |
* | lowered the number of events in the test because some CI's have an extremely ↵Ray Imber2019-10-071-2/+2
| | | | | | | | low FD limit
* | Test + fix for epoll and kqueue selector modules to properly unregisterRay Imber2019-10-061-0/+23
|/ | | | event handles that have the key type "User"