@@ -192,81 +192,6 @@ void testWithProfile(
192192 );
193193}
194194
195- <<<<<< < HEAD
196- ====== =
197- /// Execute [fn] with [FakeTime.run] inside [testWithProfile] .
198- @isTest
199- void testWithFakeTime (
200- String name,
201- FutureOr <void > Function (FakeTime fakeTime) fn, {
202- TestProfile ? testProfile,
203- ImportSource ? importSource,
204- Pattern ? integrityProblem,
205- Iterable <Pattern >? expectedLogMessages,
206- }) {
207- scopedTest (name, expectedLogMessages: expectedLogMessages, () async {
208- await FakeTime .run ((fakeTime) async {
209- setupDebugEnvBasedLogging ();
210- await withFakeServices (
211- fn: () async {
212- registerStaticFileCacheForTest (_staticFileCacheForTesting);
213-
214- await importProfile (
215- profile: testProfile ?? defaultTestProfile,
216- source: importSource,
217- );
218- await nameTracker.reloadFromDatastore ();
219- await generateFakeDownloadCountsInDatastore ();
220- await indexUpdater.updateAllPackages ();
221- await asyncQueue.ongoingProcessing;
222- fakeEmailSender.sentMessages.clear ();
223-
224- await fork (() async {
225- await fn (fakeTime);
226- });
227- await _postTestVerification (integrityProblem: integrityProblem);
228- },
229- );
230- });
231- });
232- }
233-
234- void testWithClockControl (
235- String name,
236- FutureOr <void > Function (ClockController fakeTime) fn, {
237- TestProfile ? testProfile,
238- ImportSource ? importSource,
239- Pattern ? integrityProblem,
240- Iterable <Pattern >? expectedLogMessages,
241- }) {
242- scopedTest (name, expectedLogMessages: expectedLogMessages, () async {
243- await withClockControl ((clockCtrl) async {
244- setupDebugEnvBasedLogging ();
245- await withFakeServices (
246- fn: () async {
247- registerStaticFileCacheForTest (_staticFileCacheForTesting);
248-
249- await importProfile (
250- profile: testProfile ?? defaultTestProfile,
251- source: importSource,
252- );
253- await nameTracker.reloadFromDatastore ();
254- await generateFakeDownloadCountsInDatastore ();
255- await indexUpdater.updateAllPackages ();
256- await asyncQueue.ongoingProcessing;
257- fakeEmailSender.sentMessages.clear ();
258-
259- await fork (() async {
260- await fn (clockCtrl);
261- });
262- await _postTestVerification (integrityProblem: integrityProblem);
263- },
264- );
265- });
266- });
267- }
268-
269- >>>>>> > 9bf3c7bae (Initial migration of task backend to typed_sql)
270195void setupTestsWithCallerAuthorizationIssues (
271196 Future Function (PubApiClient client) fn) {
272197 testWithProfile ('No active user' , fn: () async {
0 commit comments