restatedev / restate

Restate is the platform for building resilient applications that tolerate all infrastructure faults w/o the need for a PhD.
https://docs.restate.dev
Other
1.65k stars 37 forks source link

[TaskCenter][5/n] Introduces restate_core::test macro #2352

Closed AhmedSoliman closed 3 hours ago

AhmedSoliman commented 3 days ago

Introduces a new macro that creates a default TaskCenter in tests. This should replace usage of tokio::test (the code is mostly based on it) and it provides access to TaskCenter::current() within the test code.

This also introduces a transitional type TestCoreEnv2, a clone of TestCoreEnv but without TaskCenter. After migration, this will be renamed to TestCoreEnv again.

Stack created with Sapling. Best reviewed with ReviewStack.

github-actions[bot] commented 3 days ago

Test Results

  5 files   -  2    5 suites   - 2   1m 50s ⏱️ - 2m 40s  45 tests  -  2   44 ✅  -  2  1 💤 ±0  0 ❌ ±0  113 runs   - 69  111 ✅  - 68  2 💤  - 1  0 ❌ ±0 

Results for commit 058539c0. ± Comparison against base commit c19fcdff.

This pull request removes 2 tests. ``` dev.restate.sdktesting.tests.RunRetry ‑ withExhaustedAttempts(Client) dev.restate.sdktesting.tests.RunRetry ‑ withSuccess(Client) ```

:recycle: This comment has been updated with latest results.