The default bug view has changed. See this FAQ.

test_incoming.js: TEST-UNEXPECTED-FAIL | got false, expected true

RESOLVED FIXED in mozilla17

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jgriffin, Assigned: vicamo)

Tracking

({intermittent-failure})

Trunk
mozilla17
intermittent-failure
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
This is one of the Marionette sms WebAPI tests for B2G.  On the last 10 runs of this test, 9 have failed with:

test_incoming.js
TEST-UNEXPECTED-FAIL | Traceback (most recent call last):
File "/data/jenkins/jobs/webapi-marionette-test/workspace/testing/marionette/client/marionette/marionette_test.py", line 194, in runTest
'%d tests failed:\n%s' % (results['failed'], '\n'.join(fails)))
AssertionError: 1 tests failed:
TEST-UNEXPECTED-FAIL | got false, expected true

This is the only failure on the WebAPI CI at present.

The logcat for this test is:

I/Gecko   (   41): MARIONETTE LOG: INFO: Sent fake SMS: OK
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-PASS | undefined - OK should equal OK
I/Gecko   (   41): MARIONETTE LOG: INFO: Received an SMS!
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-PASS | undefined
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-PASS | undefined - received should equal received
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-PASS | undefined - 5555552368 should equal 5555552368
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-PASS | undefined - null should equal null
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-PASS | undefined - Hello SMS world! should equal Hello SMS world!
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-PASS | undefined
I/Gecko   (   41): MARIONETTE TEST RESULT:TEST-UNEXPECTED-FAIL | undefined
Component: DOM → DOM: Device Interfaces
QA Contact: general → device-interfaces
(Reporter)

Comment 1

5 years ago
The specific test assertion which is apparently failing, given the log above, is:

  ok(message.timestamp.getTime() > now);
(In reply to Jonathan Griffin (:jgriffin) from comment #1)
> The specific test assertion which is apparently failing, given the log
> above, is:
> 
>   ok(message.timestamp.getTime() > now);

Interesting. I'll get a patch ready to print the discrepancy of the timestamps. Maybe that'll tell us something. My initial idea was timezones, but both Date.now() and Date.prototype.getTime() should return the timestamp in UTC... mysterious, mysterious.
Mounir, can you please take a look at this failure?  If you don't have enough time, just let me know.  Thanks!
Assignee: nobody → mounir
(In reply to Andrew Overholt [:overholt] from comment #3)
> Mounir, can you please take a look at this failure?  If you don't have
> enough time, just let me know.  Thanks!

As said during the WebAPI meeting this is unlikely relevant to the WebSMS DOM code but likely to the WebSMS Gonk backend: message timestamps is provided by the backend, not the DOM code.
I assigned this to Philipp given that he said in comment 2 that he will have a look.
Assignee: mounir → philipp
(Reporter)

Updated

5 years ago
Blocks: 438871
Whiteboard: [orange]
(Assignee)

Comment 5

5 years ago
A SMS-DELIVER message comes with a timestamp embedded by SMSC and it's the one that we pass to DOM. However, its max accuracy is `seconds`, so here is an example of failure:

> INFO Received an SMS! Thu Aug 16 2012 03:17:05 GMT+0000 (GMT)
> INFO Now : 1345087025303 Thu Aug 16 2012 03:17:05 GMT+0000 (GMT)
> INFO Recv: 1345087025000 Thu Aug 16 2012 03:17:05 GMT+0000 (GMT)
> INFO Sent fake SMS: OK Thu Aug 16 2012 03:17:05 GMT+0000 (GMT)

As you may see, the SMSC timestamp was truncated to 1345087025"000". Thanks to modern CPU power, it is possible that the emulator finishes all the work in a second and therefore results in the test failure in this case.

I'll upload a patch later for this.
(Assignee)

Updated

5 years ago
Assignee: philipp → vyang
Status: NEW → ASSIGNED
(Assignee)

Updated

5 years ago
Blocks: 707659
(Assignee)

Comment 6

5 years ago
Created attachment 652318 [details] [diff] [review]
fix test failure due to SMSC timestamp truncation
Attachment #652318 - Flags: review?(philipp)
Comment on attachment 652318 [details] [diff] [review]
fix test failure due to SMSC timestamp truncation

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

Nice catch.
Attachment #652318 - Flags: review?(philipp) → review+
(Assignee)

Comment 8

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/90a5d5cca5fc
https://hg.mozilla.org/mozilla-central/rev/90a5d5cca5fc
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Keywords: intermittent-failure
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.