Skip to content

Commit f0d123f

Browse files
committed
Disable scan unit tests again as they are still flaky
1 parent 0c13e4f commit f0d123f

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

Tests/RediStackIntegrationTests/Commands/KeyCommandsTests.swift

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -125,29 +125,29 @@ final class KeyCommandsTests: RediStackIntegrationTestCase {
125125

126126
// TODO: #23 -- Rework Scan Unit Test
127127
// This is extremely flakey, and causes non-deterministic failures because of the assert on key counts
128-
func test_scan() throws {
129-
var dataset: [RedisKey] = .init(repeating: "", count: 10)
130-
for index in 1...15 {
131-
let key = RedisKey("key\(index)\(index % 2 == 0 ? "_even" : "_odd")")
132-
dataset.append(key)
133-
_ = try connection.set(key, to: "\(index)").wait()
134-
}
135-
136-
var (cursor, keys) = try connection.scanKeys(count: 5).wait()
137-
XCTAssertGreaterThanOrEqual(cursor, 0)
138-
XCTAssertGreaterThanOrEqual(keys.count, 5)
139-
140-
(_, keys) = try connection.scanKeys(startingFrom: cursor, count: 8).wait()
141-
XCTAssertGreaterThanOrEqual(keys.count, 8)
142-
143-
(cursor, keys) = try connection.scanKeys(matching: "*_odd").wait()
144-
XCTAssertGreaterThanOrEqual(cursor, 0)
145-
XCTAssertGreaterThanOrEqual(keys.count, 1)
146-
XCTAssertLessThanOrEqual(keys.count, 7)
147-
148-
(cursor, keys) = try connection.scanKeys(matching: "*_even*").wait()
149-
XCTAssertGreaterThanOrEqual(cursor, 0)
150-
XCTAssertGreaterThanOrEqual(keys.count, 1)
151-
XCTAssertLessThanOrEqual(keys.count, 7)
152-
}
128+
// func test_scan() throws {
129+
// var dataset: [RedisKey] = .init(repeating: "", count: 10)
130+
// for index in 1...15 {
131+
// let key = RedisKey("key\(index)\(index % 2 == 0 ? "_even" : "_odd")")
132+
// dataset.append(key)
133+
// _ = try connection.set(key, to: "\(index)").wait()
134+
// }
135+
//
136+
// var (cursor, keys) = try connection.scanKeys(count: 5).wait()
137+
// XCTAssertGreaterThanOrEqual(cursor, 0)
138+
// XCTAssertGreaterThanOrEqual(keys.count, 5)
139+
//
140+
// (_, keys) = try connection.scanKeys(startingFrom: cursor, count: 8).wait()
141+
// XCTAssertGreaterThanOrEqual(keys.count, 8)
142+
//
143+
// (cursor, keys) = try connection.scanKeys(matching: "*_odd").wait()
144+
// XCTAssertGreaterThanOrEqual(cursor, 0)
145+
// XCTAssertGreaterThanOrEqual(keys.count, 1)
146+
// XCTAssertLessThanOrEqual(keys.count, 7)
147+
//
148+
// (cursor, keys) = try connection.scanKeys(matching: "*_even*").wait()
149+
// XCTAssertGreaterThanOrEqual(cursor, 0)
150+
// XCTAssertGreaterThanOrEqual(keys.count, 1)
151+
// XCTAssertLessThanOrEqual(keys.count, 7)
152+
// }
153153
}

0 commit comments

Comments
 (0)