-
Notifications
You must be signed in to change notification settings - Fork 26
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
RTL6g #205
RTL6g #205
Conversation
pending("should be unnecessary to set clientId of the Message before publishing") { | ||
let options = AblyTests.commonAppSetup() | ||
options.autoConnect = false | ||
options.clientId = "client_string" |
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.
This test says "When publishing a Message with clientId set to null" yet you are setting the clientId?
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.
@mattheworiordan Ok, I see. A little confusing because the RTL6g
says Identified clients with a clientId... I thought the client needs a clientId
but the message is published without a clientId
(clientId attribute set to null) like I did:
let message = ARTMessage(data: "message", name: nil)
expect(message.clientId).to(beNil())
I will fix the test.
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.
OK
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.
The spec says "Identified clients with a clientId (as a result of either an explicitly configured clientId in ClientOptions, or implicitly through Token Auth)", but this client doesn't have a clientId, does it?
@tcard I removed the clientId
^
2c22c12
to
9cab4a3
Compare
expect(transport.protocolMessagesSent.filter { $0.action == .Message }).toEventually(haveCount(1), timeout: testTimeout) | ||
|
||
let messageSent = transport.protocolMessagesSent.filter({ $0.action == .Message })[0] | ||
expect(messageSent.messages![0].clientId).to(beNil()) |
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.
Failing with: failed - expected to be nil, got <>
9cab4a3
to
8bae968
Compare
Rebased with changes. |
pending("should be unnecessary to set clientId of the Message before publishing") { | ||
let options = AblyTests.commonAppSetup() | ||
options.autoConnect = false | ||
let client = ARTRealtime(options: options) |
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.
The spec says "Identified clients with a clientId (as a result of either an explicitly configured clientId in ClientOptions, or implicitly through Token Auth)", but this client doesn't have a clientId, does it?
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.
Done
I mean, see #205 (comment)
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.
This is still wrong as far as I can see. This is supposed to be testing publishing a message without an explicit clientId
, yet the client must be identified i.e. with a clientId
. This client is not identified
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.
@mattheworiordan @ricardopereira I've seen the discussion that @ricardopereira linked, and isn't that just what was done before? The client was being identified through ClientOptions.clientId.
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'm not following you unfortunately. This test needs an identified client to publish a message without specifying an explicit clientId
for the message. Not much more to it than that.
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.
Yes, but unless I'm reading the code very wrong, isn't that what @ricardopereira did initially and you asked him to change?
From the code snippet commented [here](8 days ago):
+ pending("should be unnecessary to set clientId of the Message before publishing") {
+ let options = AblyTests.commonAppSetup()
+ options.autoConnect = false
+ options.clientId = "client_string"
That's setting the clientId in the connection options, not in the message.
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.
Yes, I had that before. The client with a valid clientId
and the message published with no clientId
.
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.
If that's the case then I apologise, I misread it the first time. Bit confused why no one pulled me up on my mistake though!
I've tried to review the rest of the code beneath the options.clientId
at the time of my comment and Github is not allowing me to see that, so it's possible the message
clientId was being set?
Anyway, setting a clientId is valid in the options, and setting one in the message is not valid, in the context of this test.
03ff9e1
to
8e14b9b
Compare
8e14b9b
to
744dec6
Compare
Done |
LGTM |
@mattheworiordan PTAL |
Fix type of authCallback in IDL.
❌ Not passing.
Can't publish a message of type
ARTMessage
:channel.publish(message, ...)
It is possible in JavaScript: