Skip to content

Commit 39fb823

Browse files
committed
refactor: sped up tests
1 parent 4f0f66a commit 39fb823

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Tests/DataLoaderTests/DataLoaderTests.swift

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ final class DataLoaderTests: XCTestCase {
6666
async let value1 = identityLoader.load(key: 1)
6767
async let value2 = identityLoader.load(key: 2)
6868

69-
try await Task.sleep(nanoseconds: 500_000_000)
69+
try await Task.sleep(nanoseconds: 2_000_000)
7070

7171
var didFailWithError: Error?
7272

@@ -109,7 +109,7 @@ final class DataLoaderTests: XCTestCase {
109109
async let value2 = identityLoader.load(key: 2)
110110
async let value3 = identityLoader.load(key: 3)
111111

112-
try await Task.sleep(nanoseconds: 500_000_000)
112+
try await Task.sleep(nanoseconds: 2_000_000)
113113

114114
var didFailWithError: Error?
115115

@@ -149,7 +149,7 @@ final class DataLoaderTests: XCTestCase {
149149
async let value1 = identityLoader.load(key: 1)
150150
async let value2 = identityLoader.load(key: 1)
151151

152-
try await Task.sleep(nanoseconds: 500_000_000)
152+
try await Task.sleep(nanoseconds: 2_000_000)
153153

154154
var didFailWithError: Error?
155155

@@ -187,7 +187,7 @@ final class DataLoaderTests: XCTestCase {
187187
async let value1 = identityLoader.load(key: "A")
188188
async let value2 = identityLoader.load(key: "B")
189189

190-
try await Task.sleep(nanoseconds: 500_000_000)
190+
try await Task.sleep(nanoseconds: 2_000_000)
191191

192192
var didFailWithError: Error?
193193

@@ -212,7 +212,7 @@ final class DataLoaderTests: XCTestCase {
212212
async let value3 = identityLoader.load(key: "A")
213213
async let value4 = identityLoader.load(key: "C")
214214

215-
try await Task.sleep(nanoseconds: 500_000_000)
215+
try await Task.sleep(nanoseconds: 2_000_000)
216216

217217
var didFailWithError2: Error?
218218

@@ -238,7 +238,7 @@ final class DataLoaderTests: XCTestCase {
238238
async let value6 = identityLoader.load(key: "B")
239239
async let value7 = identityLoader.load(key: "C")
240240

241-
try await Task.sleep(nanoseconds: 500_000_000)
241+
try await Task.sleep(nanoseconds: 2_000_000)
242242

243243
var didFailWithError3: Error?
244244

@@ -278,7 +278,7 @@ final class DataLoaderTests: XCTestCase {
278278
async let value1 = identityLoader.load(key: "A")
279279
async let value2 = identityLoader.load(key: "B")
280280

281-
try await Task.sleep(nanoseconds: 500_000_000)
281+
try await Task.sleep(nanoseconds: 2_000_000)
282282

283283
var didFailWithError: Error?
284284

@@ -305,7 +305,7 @@ final class DataLoaderTests: XCTestCase {
305305
async let value3 = identityLoader.load(key: "A")
306306
async let value4 = identityLoader.load(key: "B")
307307

308-
try await Task.sleep(nanoseconds: 500_000_000)
308+
try await Task.sleep(nanoseconds: 2_000_000)
309309

310310
var didFailWithError2: Error?
311311

@@ -343,7 +343,7 @@ final class DataLoaderTests: XCTestCase {
343343
async let value1 = identityLoader.load(key: "A")
344344
async let value2 = identityLoader.load(key: "B")
345345

346-
try await Task.sleep(nanoseconds: 500_000_000)
346+
try await Task.sleep(nanoseconds: 2_000_000)
347347

348348
var didFailWithError: Error?
349349

@@ -370,7 +370,7 @@ final class DataLoaderTests: XCTestCase {
370370
async let value3 = identityLoader.load(key: "A")
371371
async let value4 = identityLoader.load(key: "B")
372372

373-
try await Task.sleep(nanoseconds: 500_000_000)
373+
try await Task.sleep(nanoseconds: 2_000_000)
374374

375375
var didFailWithError2: Error?
376376

@@ -410,7 +410,7 @@ final class DataLoaderTests: XCTestCase {
410410
async let value1 = identityLoader.load(key: "A")
411411
async let value2 = identityLoader.load(key: "B")
412412

413-
try await Task.sleep(nanoseconds: 500_000_000)
413+
try await Task.sleep(nanoseconds: 2_000_000)
414414

415415
var didFailWithError: Error?
416416

@@ -450,7 +450,7 @@ final class DataLoaderTests: XCTestCase {
450450
async let value1 = identityLoader.load(key: "A")
451451
async let value2 = identityLoader.load(key: "B")
452452

453-
try await Task.sleep(nanoseconds: 500_000_000)
453+
try await Task.sleep(nanoseconds: 2_000_000)
454454

455455
var didFailWithError: Error?
456456

@@ -474,7 +474,7 @@ final class DataLoaderTests: XCTestCase {
474474
async let value3 = identityLoader.load(key: "A")
475475
async let value4 = identityLoader.load(key: "B")
476476

477-
try await Task.sleep(nanoseconds: 500_000_000)
477+
try await Task.sleep(nanoseconds: 2_000_000)
478478

479479
var didFailWithError2: Error?
480480

@@ -514,7 +514,7 @@ final class DataLoaderTests: XCTestCase {
514514
async let value1 = identityLoader.load(key: "A")
515515
async let value2 = identityLoader.load(key: "B")
516516

517-
try await Task.sleep(nanoseconds: 500_000_000)
517+
try await Task.sleep(nanoseconds: 2_000_000)
518518

519519
var didFailWithError: Error?
520520

@@ -538,7 +538,7 @@ final class DataLoaderTests: XCTestCase {
538538
async let value3 = identityLoader.load(key: "A")
539539
async let value4 = identityLoader.load(key: "B")
540540

541-
try await Task.sleep(nanoseconds: 500_000_000)
541+
try await Task.sleep(nanoseconds: 2_000_000)
542542

543543
var didFailWithError2: Error?
544544

@@ -582,7 +582,7 @@ final class DataLoaderTests: XCTestCase {
582582
// Sleep for a few ms ensure that value1 & value2 are populated before continuing
583583
usleep(1000)
584584

585-
try await Task.sleep(nanoseconds: 500_000_000)
585+
try await Task.sleep(nanoseconds: 2_000_000)
586586

587587
var didFailWithError: Error?
588588

@@ -628,7 +628,7 @@ final class DataLoaderTests: XCTestCase {
628628

629629
async let value = throwLoader.load(key: 1)
630630

631-
try await Task.sleep(nanoseconds: 500_000_000)
631+
try await Task.sleep(nanoseconds: 2_000_000)
632632

633633
var didFailWithError: DataLoaderError?
634634

0 commit comments

Comments
 (0)