mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	When restarting test server with resetting the database, don't forget to close it (#923)
This commit is contained in:
		
							parent
							
								
									2140900d58
								
							
						
					
					
						commit
						3405ce902e
					
				@ -67,6 +67,9 @@ export class TestServerMerged extends EventEmitter implements IMochaServer {
 | 
			
		||||
    this._starts++;
 | 
			
		||||
    const workerIdText = process.env.MOCHA_WORKER_ID || '0';
 | 
			
		||||
    if (reset) {
 | 
			
		||||
      // Make sure this test server doesn't keep using the DB that's about to disappear.
 | 
			
		||||
      await this.closeDatabase();
 | 
			
		||||
 | 
			
		||||
      if (process.env.TESTDIR) {
 | 
			
		||||
        this.testDir = path.join(process.env.TESTDIR, workerIdText);
 | 
			
		||||
      } else {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user