Bug: Intermittent TV toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | test_initialization_with_region - [test_initialization_with_region : 128] Engines do reload with delayed region fetch - false == true
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2020-09-03 02:42:01+00:00
Resolved: 2020-10-06 17:05:50+00:00

**Filed by:** malexandru [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer.html#?job_id=314747691&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ErQCQ_KvRBa23j7-uAbEqg/runs/0/artifacts/public/logs/live_backing.log
**Reftest URL:** https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ErQCQ_KvRBa23j7-uAbEqg/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1

---

```
[task 2020-09-03T00:17:57.441Z] 00:17:57     INFO -  TEST-START | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js
[task 2020-09-03T00:18:03.705Z] 00:18:03  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | xpcshell return code: 0
[task 2020-09-03T00:18:03.705Z] 00:18:03     INFO -  TEST-INFO took 6240ms
[task 2020-09-03T00:18:03.705Z] 00:18:03     INFO -  >>>>>>>
[task 2020-09-03T00:18:03.705Z] 00:18:03     INFO -  PID 4217 | *** You are running in chaos test mode. See ChaosMode.h. ***
[task 2020-09-03T00:18:03.705Z] 00:18:03     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  running event loop
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | Starting setup
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test setup pending (2)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test setup finished (2)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | Starting test_initialization_with_region
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test test_initialization_with_region pending (2)
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "Updating home region:" ""
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "init"
[task 2020-09-03T00:18:03.706Z] 00:18:03     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.error: SearchCache: "_readCacheFile: Error reading cache file:" (new Error("", "(unknown module)"))
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_loadEngines: start"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchEngineSelector: "fetchEngineConfiguration en-US:default:default::false:xpcshell:42"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchEngineSelector: "fetchEngineConfiguration: engine@search.mozilla.org"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_loadEnginesFromConfig"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine@search.mozilla.org", locale:"default"}, orderHint:30, default:"yes", defaultPrivate:"yes"})
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "addEnginesFromExtension: engine@search.mozilla.org"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchEngine: "_setIcon: Setting icon url for" "Test search engine" "to" "moz-extension://694df4b1-3389-fa4d-b34c-f8c4b95fc582/favicon.ico"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "Test search engine"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_loadEngines: loading" 0 "engines reported by AddonManager startup"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_loadEngines: done"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_init: engines loaded, writing cache"
[task 2020-09-03T00:18:03.707Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "Completed _init"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | test_initialization_with_region - [test_initialization_with_region : 108] Test engine shouldn't be the default anymore - "Test search engine" == "Test search engine"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_handleIgnoreListUpdated"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "_getRegion called"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "_getRegion url is: " "http://localhost:51537/fetch_region"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "_getRegion called"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "_getRegion url is: " "http://localhost:51537/fetch_region"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "_getRegion returning " "FR"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "Setting current region:" "FR"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "Updating home region:" "FR"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "Region updated:" "FR"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "Running maybeReloadEngines"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchEngineSelector: "fetchEngineConfiguration en-US:FR:default::false:xpcshell:42"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchEngineSelector: "fetchEngineConfiguration: engine-pref@search.mozilla.org"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "makeEngineFromConfig:" ({webExtension:{id:"engine-pref@search.mozilla.org", locale:"default"}, orderHint:20, default:"yes", defaultPrivate:"yes"})
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "_getRegion returning " "FR"
[task 2020-09-03T00:18:03.708Z] 00:18:03     INFO -  PID 4217 | console.info: Region.jsm: "Setting current region:" "FR"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchCache: "batchTask: Invalidating engine cache"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchCache: "_buildCache: Writing to cache file."
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchCache: "_buildCache: cache file written to disk."
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "addEnginesFromExtension: engine-pref@search.mozilla.org"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "addEnginesFromExtension: Ignoring builtIn engine."
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_addEngineToStore: Adding engine:" "engine-pref"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchUtils: "NOTIFY: Engine:" "engine-pref" "Verb:" "engine-added"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchUtils: "NOTIFY: Engine:" "engine-pref" "Verb:" "engine-default"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | test_initialization_with_region - [test_initialization_with_region : 117] engine-pref should be the default in FR - "engine-pref" == "engine-pref"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "init"
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | test_initialization_with_region - [test_initialization_with_region : 122] engine-pref should be the private default in FR - "engine-pref" == "engine-pref"
[task 2020-09-03T00:18:03.709Z] 00:18:03  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | test_initialization_with_region - [test_initialization_with_region : 128] Engines do reload with delayed region fetch - false == true
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  /Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/test_initialization_with_region.js:test_initialization_with_region:128
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  /Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/head.js:_do_main:248
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  /Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/head.js:_execute_test:577
[task 2020-09-03T00:18:03.709Z] 00:18:03     INFO -  -e:null:1
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  exiting test
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  Unexpected exception NS_ERROR_ABORT:
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  _abort_failed_test@/Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/head.js:833:20
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  do_report_result@/Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/head.js:934:5
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  Assert<@/Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/head.js:73:21
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  proto.report@resource://testing-common/Assert.jsm:233:10
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  proto.ok@resource://testing-common/Assert.jsm:259:10
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  test_initialization_with_region@/Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/tests/toolkit/components/search/tests/xpcshell/test_initialization_with_region.js:128:10
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  _do_main@/Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/head.js:248:6
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  _execute_test@/Users/cltbld/tasks/task_1599087851/build/tests/xpcshell/head.js:577:5
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  @-e:1:1
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  exiting test
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "init"
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "getEngines: getting all engines for" "engine@search.mozilla.org"
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_buildSortedEngineList: using default orders"
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchUtils: "NOTIFY: Engine:" "Test search engine" "Verb:" "engine-removed"
[task 2020-09-03T00:18:03.710Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "maybeReloadEngines complete"
[task 2020-09-03T00:18:03.711Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "init"
[task 2020-09-03T00:18:03.711Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "getEngines: getting all engines for" "engine@search.mozilla.org"
[task 2020-09-03T00:18:03.711Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchService: "_buildSortedEngineList: using default orders"
[task 2020-09-03T00:18:03.711Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchCache: "batchTask: Invalidating engine cache"
[task 2020-09-03T00:18:03.711Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchCache: "_buildCache: Writing to cache file."
[task 2020-09-03T00:18:03.711Z] 00:18:03     INFO -  PID 4217 | console.debug: SearchCache: "_buildCache: cache file written to disk."
[task 2020-09-03T00:18:03.711Z] 00:18:03     INFO -  <<<<<<<
[task 2020-09-03T00:18:03.787Z] 00:18:03     INFO -  TEST-START | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js
[task 2020-09-03T00:18:09.588Z] 00:18:09  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/search/tests/xpcshell/test_initialization_with_region.js | xpcshell return code: 0
```