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

RTL10b #233

Merged
merged 3 commits into from
Feb 23, 2016
Merged

RTL10b #233

merged 3 commits into from
Feb 23, 2016

Conversation

ricardopereira
Copy link
Contributor

No description provided.

@mattheworiordan
Copy link
Member

I don't think mocking is the right approach here.

A robust integration test approach is simply (assume each step is synchronous)

  • Create client1 and client2, client2 remains disconnected autoConnect: false
  • client1 attaches to channel foo and once attached publishes 20 messages with id 0 -> 19
  • client2 attaches
  • client1 publishes 20 messages 20->39
  • check client2 has received messages 20-39
  • client2 gets history with untilAttach and should expect exactly messages 19 -> 0 in that order

@ricardopereira
Copy link
Contributor Author

@mattheworiordan PTAL

CaseTest(untilAttach: false, expected: 2)]

for caseItem in cases {
it("where value is \(caseItem.untilAttach)") {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be describing what the test is checking, not just the context.

@tcard
Copy link
Contributor

tcard commented Feb 22, 2016

Untested: "If the untilAttach param is specified when the channel is not attached, it results in an error".

query.untilAttach = true

waitUntil(timeout: testTimeout) { done in
try! channel2.history { result, errorInfo in
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use the query.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pretty basic 😓Thanks

@ricardopereira
Copy link
Contributor Author

Untested: "If the untilAttach param is specified when the channel is not attached, it results in an error".

@tcard Done 630f61a.

@tcard
Copy link
Contributor

tcard commented Feb 23, 2016

LGTM

tcard added a commit that referenced this pull request Feb 23, 2016
@tcard tcard merged commit a854ff3 into master Feb 23, 2016
@ricardopereira ricardopereira deleted the RTL10b branch February 24, 2016 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants