-
Notifications
You must be signed in to change notification settings - Fork 30
feat: add integration testing for Rust connection node #1105
Conversation
5df458a
to
c5a5d20
Compare
Codecov Report
@@ Coverage Diff @@
## master #1105 +/- ##
==========================================
+ Coverage 99.67% 99.67% +<.01%
==========================================
Files 58 58
Lines 9321 9325 +4
==========================================
+ Hits 9291 9295 +4
Misses 30 30
Continue to review full report at Codecov.
|
@@ -1,3 +1,9 @@ | |||
"""Test main instantiation |
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.
Will you file an issue to clean up these tests?
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 got it: #1106
Some(Box::new(ClientState::SendMessages(Some(messages)))), | ||
) | ||
// Filter out TTL expired messages | ||
let now = time::get_time().sec as u32; |
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.
In rust, we use timestamps of u32
, but python has timestamps of u64
. Do we need to cast up to prevent possible overruns?
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 particular timestamp is seconds precision only as its just used for the TTL comparison.
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.
pending travis resub
autopush_rs/src/client.rs
Outdated
@@ -271,7 +276,13 @@ where | |||
uaid, | |||
use_webpush: Some(true), | |||
.. | |||
} => uaid, | |||
} => { | |||
if let Some(uaid) = uaid { |
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 could be uaid.and_then(|uaid| Uuid::parse_str(uaid.as_str()).ok())
use_webpush: Some(true) isn't necessary in the destructuring above either is 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.
Thanks! I knew there was something shorter I was missing.
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 think the Some(true) is needed to enforce that it was set to True?
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 guess but it's never false anyway
c5a5d20
to
26e8e88
Compare
Adds the following functionality for capability parity: - Skip sending messages if the message is expired - Properly handle legacy messages in a message stream - Set appropriate flags for a uaid not found in the db - Always return a timestamp when querying into timestamp messages - Send messages in the order they're retrieved from the db - Accept messages from endpoint while waiting for acks - Don't save TTL:0 messages in the db if the client fails to ack them - Allow TTL:None from endpoint and treat as TTL:0 Closes #1060
26e8e88
to
c4351cc
Compare
Adds the following functionality for capability parity:
Closes #1060