Use fetch instead of axios to close connections in SQLEditor, ERD, Schema Diff and Debugger to ensure it completes. When closing a browser tab, axios does not guarantee AJAX request completion. #5894

This commit is contained in:
Aditya Toshniwal
2023-03-20 18:20:48 +05:30
committed by GitHub
parent 64aa739224
commit b923f5fcfa
9 changed files with 77 additions and 70 deletions

View File

@@ -10,7 +10,7 @@ import ERDCore from 'pgadmin.tools.erd/erd_tool/ERDCore';
import * as createEngineLib from '@projectstorm/react-diagrams';
import TEST_TABLES_DATA from './test_tables';
import { FakeLink, FakeNode } from './fake_item';
import { PortModelAlignment, PathFindingLinkFactory } from '@projectstorm/react-diagrams';
import { PortModelAlignment } from '@projectstorm/react-diagrams';
describe('ERDCore', ()=>{
let eleFactory = jasmine.createSpyObj('nodeFactories', {
@@ -45,7 +45,6 @@ describe('ERDCore', ()=>{
beforeAll(()=>{
spyOn(createEngineLib, 'default').and.returnValue(erdEngine);
spyOn(PathFindingLinkFactory.prototype, 'calculateRoutingMatrix').and.callFake(()=>{/* intentionally empty */});
});
it('initialization', ()=>{