Skip to content

Commit 2b8905d

Browse files
committed
Remove unnecessary timeout running added during wip to ensure catching all updates
1 parent ae01e0a commit 2b8905d

6 files changed

Lines changed: 4 additions & 66 deletions

src/testRunner/unittests/tsserver/typeAquisition.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ describe("unittests:: tsserver:: typeAquisition:: changes", () => {
8080
host.runPendingInstalls();
8181
host.runQueuedTimeoutCallbacks(); // First project upate after typings are installed
8282
host.runQueuedTimeoutCallbacks(); // Update scheduled after the typings from unresolved imports are discovered again
83-
host.runQueuedTimeoutCallbacks();
8483
disableTypeAcquisition();
8584
host.runQueuedTimeoutCallbacks();
8685
verifyEnabledTypeAcquisition();
@@ -107,7 +106,6 @@ describe("unittests:: tsserver:: typeAquisition:: changes", () => {
107106
disableTypeAcquisition();
108107
host.runQueuedTimeoutCallbacks(); // Update project
109108
host.runPendingInstalls();
110-
host.runQueuedTimeoutCallbacks();
111109
verifyEnabledTypeAcquisition();
112110
baselineTsserverLogs("typeAquisition", "receives update of typings after project changes", session);
113111
});
@@ -120,8 +118,6 @@ describe("unittests:: tsserver:: typeAquisition:: changes", () => {
120118
verifyEnabledTypeAcquisition();
121119
host.runPendingInstalls();
122120
host.runQueuedTimeoutCallbacks();
123-
host.runQueuedTimeoutCallbacks();
124-
host.runQueuedTimeoutCallbacks();
125121
baselineTsserverLogs("typeAquisition", "change after enabling typeAquisition", session);
126122
});
127123

@@ -164,8 +160,6 @@ describe("unittests:: tsserver:: typeAquisition:: changes", () => {
164160
function verifyEnabledTypeAcquisition() {
165161
typeAcquisition(/*enable*/ true);
166162
host.runQueuedTimeoutCallbacks();
167-
host.runQueuedTimeoutCallbacks();
168-
host.runQueuedTimeoutCallbacks();
169163
}
170164

171165
function disableTypeAcquisition() {

tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition.js

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,10 @@ Projects::
734734
projectStateVersion: 3 *changed*
735735
projectProgramVersion: 3 *changed*
736736

737+
Before running PendingInstalls callback:: count: 0
738+
739+
After running PendingInstalls callback:: count: 0
740+
737741
Before running Timeout callback:: count: 1
738742
7: *ensureProjectForOpenFiles*
739743

@@ -767,23 +771,3 @@ Info seq [hh:mm:ss:mss] event:
767771
}
768772
}
769773
After running Timeout callback:: count: 0
770-
771-
Before running Timeout callback:: count: 0
772-
773-
After running Timeout callback:: count: 0
774-
775-
Before running PendingInstalls callback:: count: 0
776-
777-
After running PendingInstalls callback:: count: 0
778-
779-
Before running Timeout callback:: count: 0
780-
781-
After running Timeout callback:: count: 0
782-
783-
Before running Timeout callback:: count: 0
784-
785-
After running Timeout callback:: count: 0
786-
787-
Before running Timeout callback:: count: 0
788-
789-
After running Timeout callback:: count: 0

tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,6 @@ Info seq [hh:mm:ss:mss] event:
829829
}
830830
After running Timeout callback:: count: 0
831831
832-
Before running Timeout callback:: count: 0
833-
834-
After running Timeout callback:: count: 0
835-
836832
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /users/user/projects/project1/jsconfig.json 1:: WatchInfo: /users/user/projects/project1/jsconfig.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Config file
837833
Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json
838834
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /users/user/projects/project1/app.js ProjectRootPath: undefined:: Result: /users/user/projects/project1/jsconfig.json
@@ -1425,11 +1421,3 @@ ScriptInfos::
14251421
version: Text-1
14261422
containingProjects: 0 *changed*
14271423
/users/user/projects/project1/jsconfig.json *deleted*
1428-
1429-
Before running Timeout callback:: count: 0
1430-
1431-
After running Timeout callback:: count: 0
1432-
1433-
Before running Timeout callback:: count: 0
1434-
1435-
After running Timeout callback:: count: 0

tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,11 +1123,3 @@ ScriptInfos::
11231123
version: Text-1
11241124
containingProjects: 0 *changed*
11251125
/users/user/projects/project1/jsconfig.json *deleted*
1126-
1127-
Before running Timeout callback:: count: 0
1128-
1129-
After running Timeout callback:: count: 0
1130-
1131-
Before running Timeout callback:: count: 0
1132-
1133-
After running Timeout callback:: count: 0

tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,11 +1086,3 @@ ScriptInfos::
10861086
version: Text-1
10871087
containingProjects: 0 *changed*
10881088
/users/user/projects/project1/jsconfig.json *deleted*
1089-
1090-
Before running Timeout callback:: count: 0
1091-
1092-
After running Timeout callback:: count: 0
1093-
1094-
Before running Timeout callback:: count: 0
1095-
1096-
After running Timeout callback:: count: 0

tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,6 @@ Info seq [hh:mm:ss:mss] event:
729729
}
730730
After running PendingInstalls callback:: count: 0
731731
732-
Before running Timeout callback:: count: 0
733-
734-
After running Timeout callback:: count: 0
735-
736732
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /users/user/projects/project1/jsconfig.json 1:: WatchInfo: /users/user/projects/project1/jsconfig.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Config file
737733
Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json
738734
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /users/user/projects/project1/app.js ProjectRootPath: undefined:: Result: /users/user/projects/project1/jsconfig.json
@@ -1075,11 +1071,3 @@ ScriptInfos::
10751071
version: Text-1
10761072
containingProjects: 0 *changed*
10771073
/users/user/projects/project1/jsconfig.json *deleted*
1078-
1079-
Before running Timeout callback:: count: 0
1080-
1081-
After running Timeout callback:: count: 0
1082-
1083-
Before running Timeout callback:: count: 0
1084-
1085-
After running Timeout callback:: count: 0

0 commit comments

Comments
 (0)