Closed
Bug 569744
Opened 14 years ago
Closed 14 years ago
Delayed loading of service.js causes test failures
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
1.5
People
(Reporter: Mardak, Assigned: philikon)
References
Details
Attachments
(2 files, 1 obsolete file)
1.50 KB,
patch
|
Details | Diff | Splinter Review | |
5.11 KB,
patch
|
Mardak
:
review+
|
Details | Diff | Splinter Review |
Running syncengine_sync with test coverage tool makes it take long enough for the delayed loading component (10 seconds) to force a load of service.js. Some reason this results in the service to mark itself as disabled (it says no crypto), but the test is actually using the crypto component already I believe. Somehow the service being disabled causes the other parts of the test to fail.. it says meta is undefined when trying to upload records.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → philipp
Assignee | ||
Comment 1•14 years ago
|
||
Have FakeCryptoService.generateRandomIV() return 24 bytes so that Weave.Service._checkCrypto() believes it's the real deal. Also fix an undeclared variable. Now test_syncengine_sync no longer fails for me when running with the coverage tool enabled.
Attachment #453322 -
Flags: review?(edilee)
Reporter | ||
Comment 2•14 years ago
|
||
Comment on attachment 453322 [details] [diff] [review] v1 >+++ b/services/sync/tests/unit/head_helpers.js > generateRandomIV: function() { >- return "fake-random-iv"; >+ return "fake-fake-fake-random-iv"; Probably best to leave a comment here about the length.
Attachment #453322 -
Flags: review?(edilee) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 4•14 years ago
|
||
http://hg.mozilla.org/services/fx-sync/rev/2a4e2281a315 Have FakeCryptoService.generateRandomIV() return 24 bytes so that Weave.Service._checkCrypto() believes it's the real deal. Fix undeclared variable.
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.4
Reporter | ||
Comment 5•14 years ago
|
||
Seems like test_records_crypto is failing sometimes. Seems like the service starts loading if the key generation takes "too long". A successful run looks like: 2010-06-23 13:09:14 run_test INFO Setting up server and authenticator 2010-06-23 13:09:14 run_test INFO Generating keypair + symmetric key 2010-06-23 13:09:14 PubKeyManager DEBUG Generating RSA keypair 2010-06-23 13:09:18 PubKeyManager DEBUG Generating RSA keypair... done 2010-06-23 13:09:18 run_test INFO Setting up keyring 2010-06-23 13:09:18 run_test INFO Creating and encrypting a record 2010-06-23 13:09:18 PubKeyManager TRACE Importing record: http://localhost:8080/pubkey 2010-06-23 13:09:18 Net.Resource DEBUG GET success 200 http://localhost:8080/pubkey 2010-06-23 13:09:18 PrivKeyManager TRACE Importing record: http://localhost:8080/privkey 2010-06-23 13:09:18 Net.Resource DEBUG GET success 200 http://localhost:8080/privkey 2010-06-23 13:09:18 run_test INFO Decrypting the record The failure looks like: 2010-06-23 13:08:22 run_test INFO Setting up server and authenticator 2010-06-23 13:08:22 run_test INFO Generating keypair + symmetric key 2010-06-23 13:08:22 PubKeyManager DEBUG Generating RSA keypair 2010-06-23 13:08:31 PubKeyManager DEBUG Generating RSA keypair... done 2010-06-23 13:08:31 run_test INFO Setting up keyring 2010-06-23 13:08:31 run_test INFO Creating and encrypting a record 2010-06-23 13:08:31 PubKeyManager TRACE Importing record: http://localhost:8080/pubkey 2010-06-23 13:08:32 Engine.Clients DEBUG Engine initialized 2010-06-23 13:08:32 Engine.Clients DEBUG Resetting clients last sync time 2010-06-23 13:08:32 Service.Main INFO Loading Weave 1.4a1pre 2010-06-23 13:08:33 Service.Main INFO Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a6pre) Gecko/20100623 Minefield/3.7a6pre 2010-06-23 13:08:33 Net.Resource DEBUG GET success 200 http://localhost:8080/pubkey 2010-06-23 13:08:33 Net.Resource DEBUG GET fail 401 http://localhost:8080/privkey 2010-06-23 13:08:33 Service.Main DEBUG Finding cluster for user 2010-06-23 13:08:33 Net.Resource DEBUG GET fail 400 https://auth.services.mozilla.com/user/1.0//node/weave An exception occurred: TypeError: privkey is null
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 6•14 years ago
|
||
The request before service is started: atob('Z3Vlc3Q6Z3Vlc3Q=') = guest:guest After service starts: atob('OnVuZGVmaW5lZA==') = :undefined So seems like the defaultAuthenticator is overridden by the ID-based BasicAuthenticator
Assignee | ||
Comment 7•14 years ago
|
||
Explicitly set username pref so that when service.js starts up (which it does after 10s, thanks to Weave.js) it doesn't reset the WeaveID's username to ''. This makes the tests pass again for me when running with the test coverage tool.
Attachment #457315 -
Flags: review?(edilee)
Reporter | ||
Updated•14 years ago
|
Attachment #457315 -
Flags: review?(edilee) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/services/fx-sync/rev/a2ad8a4d4824 Explicitly set username pref so that when service.js starts up (which it does after 10s, thanks to Weave.js) it doesn't reset the WeaveID's username to ''.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: 1.4 → 1.5
Updated•6 years ago
|
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•