Fix DataPath unit tests

This commit is contained in:
Davide De Rosa 2018-09-02 01:11:31 +02:00
parent 201da9b69b
commit 57b7457ad1
2 changed files with 16 additions and 3 deletions

View File

@ -87,8 +87,14 @@ class DataPathEncryptionTests: XCTestCase {
} }
func privateTestDataPathHigh(peerId: UInt32?) { func privateTestDataPathHigh(peerId: UInt32?) {
let path = DataPath(encrypter: enc, decrypter: dec, maxPackets: 1000, usesReplayProtection: false) let path = DataPath(
path.setCompressionFraming(.disabled) encrypter: enc,
decrypter: dec,
peerId: peerId ?? PacketPeerIdDisabled,
compressionFraming: .disabled,
maxPackets: 1000,
usesReplayProtection: false
)
if let peerId = peerId { if let peerId = peerId {
enc.setPeerId(peerId) enc.setPeerId(peerId)

View File

@ -54,7 +54,14 @@ class DataPathPerformanceTests: XCTestCase {
encrypter = crypto.encrypter() encrypter = crypto.encrypter()
decrypter = crypto.decrypter() decrypter = crypto.decrypter()
dataPath = DataPath(encrypter: encrypter, decrypter: decrypter, maxPackets: 200, usesReplayProtection: false) dataPath = DataPath(
encrypter: encrypter,
decrypter: decrypter,
peerId: PacketPeerIdDisabled,
compressionFraming: .disabled,
maxPackets: 200,
usesReplayProtection: false
)
} }
override func tearDown() { override func tearDown() {