-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
There was a problem hiding this 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
2441dee
to
38802ca
Compare
38802ca
to
a9ba2f7
Compare
|
||
let (subscriber, sample_receive_token) = topic.subscribe(); | ||
|
||
let topic = pb::TopicBuilder::<CounterTopic>::new("Test", "BasicPubSub", "Counter").build()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this API.
There was a problem hiding this comment.
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();
There was a problem hiding this comment.
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 :)
Pre-Review Checklist for the PR Author
rustfmt
iox-#123-this-is-a-branch
)iox-#42 commit text
)task-list-completed
)Notes for Reviewer
This PR adds a
testing
module with theRouDiEnvironment
and a simple test which uses theRouDiEnvironment
.Further test will be added with a future PR since #23 will refactor the API.
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References