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

iox-#5 Add RouDiEnvironment for testing #22

Merged
merged 4 commits into from
Jun 27, 2022

Conversation

elBoberido
Copy link
Member

@elBoberido elBoberido commented Jun 20, 2022

Pre-Review Checklist for the PR Author

  1. Code follows the Rust coding style and is formatted with rustfmt
  2. Branch follows the naming format (iox-#123-this-is-a-branch)
  3. Commits messages are according to this guideline
  4. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  5. Relevant issues are linked
  6. Add sensible notes for the reviewer
  7. All checks have passed (except task-list-completed)
  8. Assign PR to reviewer

Notes for Reviewer

This PR adds a testing module with the RouDiEnvironment and a simple test which uses the RouDiEnvironment.

Further test will be added with a future PR since #23 will refactor the API.

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

@elBoberido elBoberido self-assigned this Jun 20, 2022
build.rs Outdated Show resolved Hide resolved
Copy link
Member

@dkroenke dkroenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testcases are missing, additionally the code needs to be formatted with rustfmt

src/tests/basic_pub_sub.rs Outdated Show resolved Hide resolved
src/tests/basic_pub_sub.rs Show resolved Hide resolved
src/tests/basic_pub_sub.rs Outdated Show resolved Hide resolved
@elBoberido elBoberido force-pushed the iox-#5-add-roudi-environment branch 6 times, most recently from 2441dee to 38802ca Compare June 21, 2022 20:47
@elBoberido elBoberido marked this pull request as ready for review June 21, 2022 20:51
@elBoberido elBoberido requested a review from dkroenke June 21, 2022 20:51
@elBoberido elBoberido force-pushed the iox-#5-add-roudi-environment branch from 38802ca to a9ba2f7 Compare June 21, 2022 20:52
@elBoberido elBoberido changed the title iox-#5 Add RuDiEnvironment for testing iox-#5 Add RouDiEnvironment for testing Jun 21, 2022

let (subscriber, sample_receive_token) = topic.subscribe();

let topic = pb::TopicBuilder::<CounterTopic>::new("Test", "BasicPubSub", "Counter").build()?;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this API.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe, unfortunately the subscribe/offer on create feature broke this. One could think of something like

let topic = TopicBuilder::<CounterTopic>::new("Test", "BasicPubSub", "Counter").build()?;
let (subscriber, sample_receive_token) = topic.subscriber().history_request(1).create();
let publisher = topic.publisher().history_capacity(5).create();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... oh, and ideally it would be TopicBuilder::<CounterTopic>::new("/Test/BasicPubSub/Counter").build()?; ... maybe for the 0.2 release :)

src/tests/basic_pub_sub.rs Show resolved Hide resolved
@elBoberido elBoberido merged commit 33bd997 into master Jun 27, 2022
@elBoberido elBoberido deleted the iox-#5-add-roudi-environment branch June 27, 2022 10:46
@elBoberido elBoberido linked an issue Jun 27, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create integration tests
3 participants