Skip to content

Commit

Permalink
[TaskCenter][5/n] Introduces restate_core::test macro
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AhmedSoliman committed Nov 25, 2024
1 parent 9b5b5ca commit 60e84fc
Show file tree
Hide file tree
Showing 12 changed files with 1,469 additions and 424 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
members = [
"cli",
"crates/*",
"crates/core/derive",
"crates/codederror/derive",
"server",
"benchmarks",
Expand All @@ -14,6 +15,7 @@ members = [
default-members = [
"cli",
"crates/*",
"crates/core/derive",
"crates/codederror/derive",
"server",
"tools/restatectl",
Expand All @@ -38,6 +40,7 @@ restate-base64-util = { path = "crates/base64-util" }
restate-bifrost = { path = "crates/bifrost" }
restate-cli-util = { path = "crates/cli-util" }
restate-core = { path = "crates/core" }
restate-core-derive = { path = "crates/core/derive" }
restate-errors = { path = "crates/errors" }
restate-fs-util = { path = "crates/fs-util" }
restate-futures-util = { path = "crates/futures-util" }
Expand Down
Loading

0 comments on commit 60e84fc

Please sign in to comment.