-
Notifications
You must be signed in to change notification settings - Fork 4
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
adding more tests #37
Open
harsh-ps-2003
wants to merge
15
commits into
astraly-labs:main
Choose a base branch
from
harsh-ps-2003:test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR :
Moved from static test directories to dynamic temp directories
Updated Committee implementation with test helpers
Improved test utilities and fixtures
and adds following tests :
Header Tests :
Tests initialization, quorum waiting, sync status handling, and digest buffer operations
Includes edge cases like empty digests and timeout scenarios
Added tests for multiple rounds and invalid vote handling
test_header_builder_initialization() - Tests proper setup of HeaderBuilder
test_wait_for_quorum() - Tests quorum collection mechanism
test_header_builder_sync_status() - Tests sync state handling
test_header_builder_with_empty_digests() - Edge case: empty digest handling
test_header_builder_multiple_rounds() - Tests multi-round header building
test_header_builder_quorum_timeout() - Tests timeout handling
test_header_builder_invalid_votes() - Tests invalid vote rejection
test_header_builder_digest_buffer() - Tests digest buffer operations
Primary Synchronizer Tests :
Tests concurrent request handling, retry logic on failures, partial response handling, invalid response data scenarios
test_synchronizer_concurrent_requests() - Tests parallel request handling
test_synchronizer_retry_on_failure() - Tests retry mechanism
test_synchronizer_multiple_peers() - Tests multi-peer interactions
test_synchronizer_invalid_response_data() - Tests invalid response handling
Fetcher Tests :
Tests basic fetching operations, timeout handling, error responses
Covers multiple peer scenarios and response validation
Tests retry mechanisms on failed fetches
test_fetcher_basic() - Tests basic fetch operations
test_fetcher_empty()
test_fetcher_timeout() - Tests timeout handling
test_fetcher_error_response() - Tests error response handling
test_fetcher_multiple_peers() - Tests fetching from multiple peers
test_fetcher_single_request() - Tests single request flow
DAG tests :
Tests basic DAG creation and operations, parent-child relationships, invalid parent scenarios, layer operations, complex hierarchies with multiple parents, cyclic insertion prevention
test_dag_creation_and_basic_ops() - Tests basic DAG operations
test_dag_parent_child_relationships() - Tests relationship validations
test_dag_invalid_parent() - Tests invalid parent handling
test_dag_layer_operations() - Tests layer-based operations
test_dag_multiple_parents() - Tests multiple parent scenarios
test_dag_cyclic_insertion_prevention() - Tests cycle prevention
test_dag_complex_hierarchy() - Tests complex DAG structures
The
cargo test
passes :