forked from mirrors/gecko-dev
		
	Bug 1885310 - Await SearchService init in TelemetryEnvironment test r=janerik,mcheang, a=test-only
Differential Revision: https://phabricator.services.mozilla.com/D214979
This commit is contained in:
		
							parent
							
								
									aa2b46d4e7
								
							
						
					
					
						commit
						30e220b0b9
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -1021,6 +1021,10 @@ add_task( | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|     Services.obs.notifyObservers(null, "sessionstore-windows-restored"); |     Services.obs.notifyObservers(null, "sessionstore-windows-restored"); | ||||||
|  |     // Session restore triggers search service init asynchronously.
 | ||||||
|  |     // If this completes during shutdown, it throws an exception.
 | ||||||
|  |     // Await the search service init to make this deterministic (bug 1885310).
 | ||||||
|  |     await Services.search.promiseInitialized; | ||||||
| 
 | 
 | ||||||
|     environmentData = TelemetryEnvironment.currentEnvironment; |     environmentData = TelemetryEnvironment.currentEnvironment; | ||||||
|     TelemetryEnvironmentTesting.checkEnvironmentData(environmentData); |     TelemetryEnvironmentTesting.checkEnvironmentData(environmentData); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Chris H-C
						Chris H-C