bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

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

RESOLVED FIXED in Firefox 18



DOM: Device Interfaces
6 years ago
6 years ago


(Reporter: rwood, Assigned: rwood)


Gonk (Firefox OS)

Firefox Tracking Flags

(firefox18 fixed, firefox19 fixed)



(1 attachment, 1 obsolete attachment)



6 years ago
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.

Comment 1

6 years ago
Created attachment 677027 [details] [diff] [review]
Patch for 807055

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-

Comment 3

6 years ago
Created attachment 677097 [details] [diff] [review]
Updated patch for 807055

Removing the original test and not replacing it, based on feedback comments.
Attachment #677027 - Attachment is obsolete: true
Attachment #677097 - Flags: feedback?(vyang)

Comment 4

6 years ago
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+
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [automation-needed-in-aurora]
status-firefox18: --- → fixed
status-firefox19: --- → fixed
Whiteboard: [automation-needed-in-aurora]
You need to log in before you can comment on or make changes to this bug.