Closed Bug 958126 Opened 8 years ago Closed 8 years ago

Tests which install extensions can fail because the installation can be drastically delayed

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect, P2)

All
Linux

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: cosmin-malutan)

References

Details

Attachments

(1 file)

As what I have seen today is that installing one of our locally hosted extensions can be delayed until our test is marked as failed. If we shutdown the application in such a case, we run into an assertion because the install dialog pops-up when the main window has already been closed.

The problem here is that a request to a remote site as given via extensions.getAddons.get.url happens. We could also change this URL, but I wonder if we could completely disable any remote activity if we install add-ons via localhost.

Dave or Blair, is there a setting for that?
Flags: needinfo?(dtownsend+bugmail)
Flags: needinfo?(bmcbride)
Actually this is the case if the machine you are running the test on, is not connected to the network.
Depends on: 958133
I think this setting should do the trick https://blog.mozilla.org/addons/how-to-opt-out-of-add-on-metadata-updates/
Flags: needinfo?(dtownsend+bugmail)
Flags: needinfo?(bmcbride)
Thanks Dave. We will check if that works for us. Andreea and Otilia, could someone from your team could help here? This bug could be the reason why some of our add-on tests are failing with disconnects. We haven't seen it that much lately but I want to make sure that our tests are getting more stable. Thanks.
Flags: needinfo?(otilia.anica)
Flags: needinfo?(andreea.matei)
Priority: -- → P2
Cosmin is looking into this.
Assignee: nobody → cosmin.malutan
Status: NEW → ASSIGNED
Flags: needinfo?(otilia.anica)
Flags: needinfo?(andreea.matei)
Hi Henrik I tried to reproduce this in the morning but I couldn't. I followed the steps from bug 958133.
Is this intermittent or is a constant failure for you, because if is constant I might be missing something?
It happens all the time. Best is most likely when you connect yourself to a router which isn't connected to the internet.
Thanks, I had ran testruns/simple tests whithout internet connection or from VM connected to an internal network without internet connection but I couldn't reproduce it.
We don't have a spare router to test this and because it would be a lot bureaucracy to request a router from IT I will try to reproduce on this at home.
Attached patch patch v0.1.patchSplinter Review
I tested this while connected to a router without internet connection and indeed the add-on installation will hang.
Whit the preference  Dave Townsend suggested it passes.

I guess we have to set the preference everywhere we install ad-dons in functional tests.
Attachment #8359360 - Flags: feedback?(andreea.matei)
That's good to hear, Cosmin. Looks like we should do that in a more general basis.

Dave, how should test frameworks handle that preference as best? Shall we completely disable it to not interfere with any e.g. telemetry done with the information? Or wouldn't it hurt the AMO data to leave it enabled for tests?
Flags: needinfo?(dtownsend+bugmail)
It should probably be disabled, it already is for most test harnesses: http://mxr.mozilla.org/mozilla-central/source/testing/profiles/prefs_general.js#57
Flags: needinfo?(dtownsend+bugmail)
Comment on attachment 8359360 [details] [diff] [review]
patch v0.1.patch

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

Since we'll have this change overall, please file a bug in Mozbase for it.
Attachment #8359360 - Flags: feedback?(andreea.matei)
Depends on: 960976
Depends on: 960495
No longer depends on: 960976
Has been fixed in bug 960976.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 960976
I really don't understand why this should be a dupe! This is clearly on the dependency list. So as you said it has been fixed by bug 960976, which is in another product!
Resolution: DUPLICATE → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.