This commit fixes a crash that occurred when clicking "follow all" during onboarding. This fix works by making `Contacts` and `PostBox` isolated into a specific Swift Actor, and updating direct and indirect usages accordingly. Changelog-Fixed: Fixed a crash that occurred when clicking "follow all" during onboarding. Closes: https://github.com/damus-io/damus/issues/3422 Co-authored-by: alltheseas <64376233+alltheseas@users.noreply.github.com> Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
33 lines
848 B
Swift
33 lines
848 B
Swift
//
|
||
// DamusCacheManagerTests.swift
|
||
// damusTests
|
||
//
|
||
// Created by Daniel D’Aquino on 2023-10-04.
|
||
//
|
||
|
||
import Foundation
|
||
|
||
import Foundation
|
||
import XCTest
|
||
@testable import damus
|
||
import SwiftUI
|
||
|
||
final class DamusCacheManagerTests: XCTestCase {
|
||
|
||
override func setUpWithError() throws {
|
||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||
}
|
||
|
||
override func tearDownWithError() throws {
|
||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||
}
|
||
|
||
/// Simple smoke test to check if clearing cache will crash the system
|
||
@MainActor
|
||
func testCacheManagerSmoke() throws {
|
||
for _ in Range(0...20) {
|
||
DamusCacheManager.shared.clear_cache(damus_state: test_damus_state)
|
||
}
|
||
}
|
||
}
|