Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test suite to ensure the correctness of AsyncRuntime implementation. #1209

Closed
drmingdrmer opened this issue Jul 29, 2024 · 6 comments
Closed

Comments

@drmingdrmer
Copy link
Member

No description provided.

Copy link

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

@SteveLauC
Copy link
Collaborator

I wonder what kinds of tests we should add for an implementation of AsyncRuntime, for this test suite, I think we should verify the functions and primitives will work correctly.

I also want to run some integration tests to check if Openraft would work with the runtime as well.

Thoughts on this?

@drmingdrmer
Copy link
Member Author

drmingdrmer commented Aug 1, 2024

For example for Mutex, it should provide exclusive accessing to some value. Such as:
https://github.com/drmingdrmer/openraft/blob/bc4b4e54661308ae47b88b39373f82c54dd5780c/openraft/src/sync/mutex.rs#L130-L168

And similar to other components. At least the very basic behavior should be guaranteed by these tests.
There is also a test suite to ensure the behaviors of RaftLogStorage:

https://github.com/drmingdrmer/openraft/blob/113-mutex/openraft/src/testing/suite.rs

@SteveLauC
Copy link
Collaborator

At least the very basic behavior should be guaranteed by these tests.

Will give this a try this morning.

There is also a test suite to ensure the behaviors of RaftLogStorage

Yeah, I am thinking about putting the test suite for logs and state machine in a module log, and adding another module runtime for the tests of AsyncRuntime.

@SteveLauC
Copy link
Collaborator

Looks like this can be closed as well. 😀

@drmingdrmer
Copy link
Member Author

Aye!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants