Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Dec 10, 2024
1 parent fbff8cf commit e87a7c5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Database/Tests/RocksDBSwiftTests/RocksDBTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ final class RocksDBTests {
try rocksDB.put(column: .col1, key: "123".data, value: "qwe".data)

try rocksDB.batch(operations: [
.delete(column: .col1, key: "123".data),
.put(column: .col1, key: "234".data, value: "wer".data),
.put(column: .col1, key: "345".data, value: "ert".data),
.delete(column: .col1, key: "234".data),
.put(column: .col1, key: "345".data, value: "ertert".data),
.delete(column: Columns.col1.rawValue, key: "123".data),
.put(column: Columns.col1.rawValue, key: "234".data, value: "wer".data),
.put(column: Columns.col1.rawValue, key: "345".data, value: "ert".data),
.delete(column: Columns.col1.rawValue, key: "234".data),
.put(column: Columns.col1.rawValue, key: "345".data, value: "ertert".data),
])

#expect(try rocksDB.get(column: .col1, key: "123".data) == nil)
Expand Down Expand Up @@ -89,9 +89,9 @@ final class RocksDBTests {
@Test func testBatchOperationsAcrossColumns() throws {
// Test batch operations across different column families
try rocksDB.batch(operations: [
.put(column: .col1, key: "batch1".data, value: "value1".data),
.put(column: .col2, key: "batch2".data, value: "value2".data),
.put(column: .col3, key: "batch3".data, value: "value3".data),
.put(column: Columns.col1.rawValue, key: "batch1".data, value: "value1".data),
.put(column: Columns.col2.rawValue, key: "batch2".data, value: "value2".data),
.put(column: Columns.col3.rawValue, key: "batch3".data, value: "value3".data),
])

#expect(try rocksDB.get(column: .col1, key: "batch1".data) == "value1".data)
Expand Down

0 comments on commit e87a7c5

Please sign in to comment.