Closed
Bug 1064228
Opened 11 years ago
Closed 11 years ago
[v2.2][v2.1] gaiatest atoms: Make settings api test functions wait on transaction
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect)
Tracking
(b2g-v1.4 unaffected, b2g-v2.0 unaffected, b2g-v2.0M unaffected, b2g-v2.1 fixed, b2g-v2.2 fixed)
RESOLVED
FIXED
2.1 S5 (26sep)
Tracking | Status | |
---|---|---|
b2g-v1.4 | --- | unaffected |
b2g-v2.0 | --- | unaffected |
b2g-v2.0M | --- | unaffected |
b2g-v2.1 | --- | fixed |
b2g-v2.2 | --- | fixed |
People
(Reporter: RobertC, Assigned: qdot)
References
Details
(Keywords: qablocker, regression, Whiteboard: [fromAutomation][xfail][systemsfe])
Attachments
(2 files)
In test_unlock_to_camera_with_passcode we add a passcode and enable the lockscreen via javascript, but the changes do not work as expected.
When I navigate to Settings the passcode lock option appears as being enabled, but when I unlock the device I am not prompted for a passcode.
This issue cannot be reproduced with manual testing, only with automation. The reproduction rate with automation is 100%.
Link to test: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera_with_passcode.py
I tried to test the bellow build locally, but I had issues starting the phone after flashing. The regression window is done with the help of the Jenkins inbound test runs.
Last working build:
Device firmware (date) 31 Aug 2014 13:31:23
Device firmware (incremental) eng.cltbld.20140831.163113
Device firmware (release) 4.3
Device identifier flame
Gaia date 04 Sep 2014 10:32:56
Gaia revision 2bac78bdd095
Gecko build 20140904110502
Gecko revision b0411338116f
Gecko version 35.0a1
First broken:
Device firmware (date) 31 Aug 2014 13:31:23
Device firmware (incremental) eng.cltbld.20140831.163113
Device firmware (release) 4.3
Device identifier flame
Gaia date 04 Sep 2014 10:32:56
Gaia revision 2bac78bdd095
Gecko build 20140904111729
Gecko revision be51c20e5b0f
Gecko version 35.0a1
I ran the test locally step by step in debug mode. After the settings were applied I manually locked the device the tried to unlock to camera, but was not asked for a passcode (logcat attached)
![]() |
||
Comment 1•11 years ago
|
||
Gaia commits are the same, so this is a gecko regression.
![]() |
||
Comment 2•11 years ago
|
||
![]() |
||
Comment 3•11 years ago
|
||
Broken by bug 1061510.
Kyle - Any ideas?
Blocks: 1061510
Flags: needinfo?(kyle)
![]() |
||
Updated•11 years ago
|
Component: Gaia::UI Tests → DOM: Device Interfaces
Product: Firefox OS → Core
![]() |
||
Comment 4•11 years ago
|
||
[Blocking Requested - why for this release]:
QA blocking regression from a 2.1+ blocker. Needed to be fixed to uplift bug 1061510 without regressions.
![]() |
||
Updated•11 years ago
|
Whiteboard: [fromAutomation][xfail] → [fromAutomation][xfail][systemsfe]
![]() |
||
Comment 5•11 years ago
|
||
Actually I'll hold off on the nomination until I hear back from Kyle if this requires a test update or if it's a settings API regression.
blocking-b2g: 2.1? → ---
Assignee | ||
Comment 6•11 years ago
|
||
Yup, I've got an idea, that may be the reason we're seeing a lot of automation failure outside of the READ_ONLY issue.
Python tests move really, really fast through the UI. As we can see from the code in the lockscreen test, they're usually using data layer to inject settings changes. The problem is, the data layer setSettings function only waits for set to return.
https://github.com/mozilla-b2g/gaia/blob/2b3c6ae2e3d85b49e7dcfb60e7065c2df41dda61/tests/atoms/gaia_data_layer.js#L208
This used to be fine before we OOP'd settings, but now waiting on set success means we only make sure the settings API got the request to set, not that we've actually finished the transaction the set was in.
For user driven UI, this is ok because people usually can't click faster than our IPC system. For automation, however, this is race condition time because we can try to do things before the transaction to change the setting and updating of observers may've finished.
Waiting on the transaction to end, which has its own event handler, should fix this.
Assignee: nobody → kyle
Flags: needinfo?(kyle)
![]() |
||
Updated•11 years ago
|
Component: DOM: Device Interfaces → Gaia::UI Tests
Product: Core → Firefox OS
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8485836 [details] [review]
Patch 1 (v1) - Make settings api test functions wait on transaction
Assigning multiple reviewers just cause this needs to land ASAP. First one to get to it wins.
Attachment #8485836 -
Flags: review?(zcampbell)
Attachment #8485836 -
Flags: review?(florin.strugariu)
Attachment #8485836 -
Flags: review?(dave.hunt)
Assignee | ||
Comment 9•11 years ago
|
||
[Blocking Requested - why for this release]: This will cause intermittents on tests that move to quickly through UI.
blocking-b2g: --- → 2.1?
status-b2g-v1.4:
--- → unaffected
status-b2g-v2.0:
--- → unaffected
status-b2g-v2.0M:
--- → unaffected
status-b2g-v2.1:
--- → affected
status-b2g-v2.2:
--- → affected
![]() |
Reporter | |
Comment 10•11 years ago
|
||
Comment on attachment 8485836 [details] [review]
Patch 1 (v1) - Make settings api test functions wait on transaction
I ran test_unlock_to_camera_with_passcode with this patch and it still failed with the same behavior as described in comment 0
Attachment #8485836 -
Flags: review-
Comment 11•11 years ago
|
||
Test test_power_button_long_press.py is failing on master because of a similar issue.
The sleep menu shows different items if the volume is set to 0 or to a higher value.
If the volume is set to 0 we should expect ["Turn on airplane mode", "Ring incoming calls", "Restart", "Power off"] menu items.
If the volume is set to a value higher than 0, we should expect ["Turn on airplane mode", "Silence incoming calls", "Restart", "Power off"] menu items.
The set volume script we use to set the volume to 0 in setup is not working as expected, the volume remains set to its default value: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L878. In order to set the volume, we use the setSetting script: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L261.
As the default volume is higher than 0, the test fails when checking the sleep menu items.
The regression range of this failure is the same as the one described in comment 0.
Link to the test: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/system/test_power_button_long_press.py
Jenkins report of the test failure: http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame.b2g-inbound.ui.functional.smoke/1338/HTML_Report/
Comment 12•11 years ago
|
||
Comment on attachment 8485836 [details] [review]
Patch 1 (v1) - Make settings api test functions wait on transaction
Clearing review request based on RobertC's findings.
Attachment #8485836 -
Flags: review?(dave.hunt)
Comment 13•11 years ago
|
||
Comment on attachment 8485836 [details] [review]
Patch 1 (v1) - Make settings api test functions wait on transaction
I still can reproduce the issue
Attachment #8485836 -
Flags: review?(florin.strugariu) → review-
Comment 14•11 years ago
|
||
Updating bug name as v2.1 is affected too
Summary: [v2.2] Modifying setting in tests does not work as expected → [v2.2][v2.1] Modifying setting in tests does not work as expected
![]() |
||
Comment 15•11 years ago
|
||
I'm re-reviewing this on the last good Flame build before we hit the crasher.
![]() |
||
Comment 16•11 years ago
|
||
Comment on attachment 8485836 [details] [review]
Patch 1 (v1) - Make settings api test functions wait on transaction
r+, works nicely on a pre-bug 1062255 build.
Bebe, Robert, can you re-test this on a build that includes this backout (when time permits)?
https://tbpl.mozilla.org/?rev=31ce2eb10676
Attachment #8485836 -
Flags: review?(zcampbell)
Attachment #8485836 -
Flags: review?(robert.chira)
Attachment #8485836 -
Flags: review?(florin.strugariu)
Attachment #8485836 -
Flags: review-
Attachment #8485836 -
Flags: review+
Comment 17•11 years ago
|
||
I tested this on latest b2g-i and it still fails
I will wait for a build that includes that blackout
Comment 18•11 years ago
|
||
I would say just land as NPOTB. Do you guys want approval for those patches as well?
blocking-b2g: 2.1? → ---
Flags: needinfo?(fabrice)
Flags: needinfo?(bbajaj)
Comment 19•11 years ago
|
||
(In reply to Gregor Wagner [:gwagner] from comment #18)
> I would say just land as NPOTB. Do you guys want approval for those patches
> as well?
yes, as sometimes these NPOTB changes although non-user facing, end up breaking builds :) So seeking approval will be helpful to keep an eye on the changes going on and err on the side of caution ;)
Flags: needinfo?(bbajaj)
Updated•11 years ago
|
Flags: needinfo?(fabrice)
![]() |
||
Comment 20•11 years ago
|
||
There is some suspicion that this bug is a conflation of some other bugs, we'll look into it and see if we still need the patch on v2.1 and if ont we'll take it on master as an enhancement.
![]() |
||
Comment 21•11 years ago
|
||
OK I've found a better way to demonstrate the problem.
What I am seeing is that when we push a preference from outside of the UI (ie, by our atom), the event is not picked up by Gaia and it acted upon. Previously this would work.
I have tested this with and without qDot's patch.
STR:
Pre-requisite: Install gaiatest, adb forward tcp:2828 tcp:2828
This STR will use gcli from the command line for ease, but gcli uses the exact same underlying settings atoms that gaiatest uses.
1. Restart your device... *do not start the Settings app* (see workaround below)
2. At command line: gcli getsetting language.current
> language.current: en-US
3. gcli setsetting language.current zh-TW
>
4. gcli getsetting language.current
> language.current: zh-TW (This verifies that the setting is set)
5. Observe the UI - it is still showing icon names in en-US
6. Load settings app, observe language setting.
The language setting in the Settings app main screen will show the setting as being Taiwanese but all of the Settings all will be in English.
*** Workaround:
1. Load the settings app in the background
2. Switch back to homescreen
3. gcli setsetting language.current zh-TW
4. Homescreen icons will change to Taiwanese localisation.
Are there some kind of Settings database listeners only applied when the Settings app is open?
The reason why I did not notice this when I reviewed the patch earlier is that I ran tests that only check that the setting is updated in the database.
qdot, ni? you to update you. It sounds like this is at a higher level but you might know who to ask.. (Settings app owners, perhaps).
Flags: needinfo?(kyle)
![]() |
||
Updated•11 years ago
|
Summary: [v2.2][v2.1] Modifying setting in tests does not work as expected → [v2.2][v2.1] Modifying setting in tests does propagate to System
Updated•11 years ago
|
Summary: [v2.2][v2.1] Modifying setting in tests does propagate to System → [v2.2][v2.1] Modifying setting in tests does not propagate to System
Assignee | ||
Comment 23•11 years ago
|
||
Nope. It's probably me. I bet it's bug 1065128. Something between booting and you running gcli is blowing away the observer list, so no observers are updated. Once bug 1065128 lands, that should clear up. Might be worth testing this on top of that one too. Adding that as a dependency.
Depends on: 1065128
Flags: needinfo?(kyle)
![]() |
||
Comment 24•11 years ago
|
||
Jason, based on Kyle's more recent update, can you set blocking+ status on this?
We have disabled QA smoketest automation because of it.
Component: Gaia::UI Tests → General
Flags: needinfo?(jsmith)
![]() |
||
Comment 25•11 years ago
|
||
I talked with Kyle in IRC about this. My understanding is that the test blocker here is bug 1065128, which is already nominated to block. This bug is tracking the test update needed here, so this wouldn't be a blocker for being NPOTB.
Flags: needinfo?(jsmith)
![]() |
||
Updated•11 years ago
|
Component: General → Gaia::UI Tests
![]() |
||
Comment 26•11 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #25)
> I talked with Kyle in IRC about this. My understanding is that the test
> blocker here is bug 1065128, which is already nominated to block. This bug
> is tracking the test update needed here, so this wouldn't be a blocker for
> being NPOTB.
We are going to fix this before uplifting the regressing changeset, however.
![]() |
||
Comment 27•11 years ago
|
||
Thanks Jason, yes I agree that this is not a blocker then. We don't need to take the patch in this bug, but we'd like to as it's an improvement.
I'll re-jig this one to be about applying qDot's patch, but the test failures are all because of bug 1065128.
Summary: [v2.2][v2.1] Modifying setting in tests does not propagate to System → [v2.2][v2.1] gaiatest atoms: Make settings api test functions wait on transaction
Updated•11 years ago
|
Target Milestone: --- → 2.1 S4 (12sep)
![]() |
Reporter | |
Updated•11 years ago
|
Attachment #8485836 -
Flags: review?(robert.chira) → review+
![]() |
Reporter | |
Updated•11 years ago
|
Attachment #8485836 -
Flags: review?(florin.strugariu)
Updated•11 years ago
|
Attachment #8485836 -
Flags: review+
![]() |
Reporter | |
Comment 28•11 years ago
|
||
Merged to master:
https://github.com/mozilla-b2g/gaia/commit/bba262357ac37b79874a7ba1cbddbcc811a7b8c4
Waiting for the fix from Bug 1065128 to be uplifted to v2.1 before merging there.
Comment 29•11 years ago
|
||
Bug resolution tracks landing on master. That said, you'll need to request Gaia v2.1 approval on this patch before it can land on v2.1 anyway.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(kyle)
Resolution: --- → FIXED
Target Milestone: 2.1 S4 (12sep) → 2.1 S5 (26sep)
Assignee | ||
Comment 30•11 years ago
|
||
Comment on attachment 8485836 [details] [review]
Patch 1 (v1) - Make settings api test functions wait on transaction
Approval Request Comment
[Feature/regressing bug #]: Bug 900551
[User impact if declined]: Tests may break randomly
[Describe test coverage new/current, TBPL]: This is a test
[Risks and why]: None
[String/UUID change made/needed]: None
Attachment #8485836 -
Flags: approval-gaia-v2.1?
Flags: needinfo?(kyle)
Updated•11 years ago
|
Attachment #8485836 -
Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
![]() |
||
Comment 31•11 years ago
|
||
Comment 32•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•