Closed Bug 807055 Opened 12 years ago Closed 12 years ago

[WebAPI] WebSMS: Modify sms timestamp test so won't random orange based on time drift

Categories

(Core :: DOM: Device Interfaces, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: rwood, Assigned: rwood)

Details

Attachments

(1 file, 1 obsolete file)

Incoming SMS message timestamps are determined by the SMSC, not the device timestamp. Therefore if receive an SMS, and then send an SMS immediately after, the timestamp on the sent sms (which comes from the device time) can actually be earlier/less than the timestamp in the received SMS, even though the received sms came first.  This is a known issue and is due to time drift between the SMSC and the emulator/device.  There are currently no plans to change this behaviour (Bug 784285).

Test_timestamp.js currently receives an SMS and then sends one, and then compares the timestamps giving a 1 second lee-way to make up for the time difference.  However on TBPL the time difference is sometimes showing up as high as 10 seconds.

To avoid having the test random orange forever, modify the test so that it compares the timestamps of sent messages with other sent messages, and received messages with other received messages - that way not comparing device timestamps with SMSC timestamps, to avoid dealing with time difference.
Attached patch Patch for 807055 (obsolete) — Splinter Review
Replacing test_timestamp.js with two simpler tests.
Attachment #677027 - Flags: feedback?(vyang)
Comment on attachment 677027 [details] [diff] [review]
Patch for 807055

Review of attachment 677027 [details] [diff] [review]:
-----------------------------------------------------------------

Why not just remove test_timestamp.js? In the test_incoming_timestamp.js, comparing the timestamps of two incoming messages is also meaningless. There is no such rule that says latter incoming message must have a larger timestamp than the former one, even with the same originator. The same thing applies to outgoing messages: there can be tries!
Attachment #677027 - Flags: feedback?(vyang) → feedback-
Removing the original test and not replacing it, based on feedback comments.
Attachment #677027 - Attachment is obsolete: true
Attachment #677097 - Flags: feedback?(vyang)
Comment on attachment 677097 [details] [diff] [review]
Updated patch for 807055

Actually I don't believe feedback is required anymore since I am just deleting a test. Removing feedback flag and adding review?, so this can be submitted ASAP and remove the test orange from TBPL.
Attachment #677097 - Flags: feedback?(vyang) → review?(jgriffin)
Comment on attachment 677097 [details] [diff] [review]
Updated patch for 807055

Review of attachment 677097 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks Rob.
Attachment #677097 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/projects/ash/rev/df23ed09ef37
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [automation-needed-in-aurora]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: