Skip to content

Commit

Permalink
fix: remove compilation warnings (#47)
Browse files Browse the repository at this point in the history
Removes compilation warnings in some tests

Signed-off-by: Fabrizio Demaria <[email protected]>
  • Loading branch information
fabriziodemaria authored Sep 10, 2024
1 parent 565e733 commit a21214e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Tests/OpenFeatureTests/DeveloperExperienceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ final class DeveloperExperienceTests: XCTestCase {
let provider = InjectableEventHandlerProvider(eventHandler: eventHandler)
Task {
await OpenFeatureAPI.shared.setProviderAndWait(provider: provider)
wait(for: [readyExpectation], timeout: 1)
await fulfillment(of: [readyExpectation], timeout: 1)
initCompleteExpectation.fulfill()
}
wait(for: [notReadyExpectation], timeout: 1)
Expand All @@ -81,7 +81,7 @@ final class DeveloperExperienceTests: XCTestCase {
let brokenProvider = AlwaysBrokenProvider()
Task {
await OpenFeatureAPI.shared.setProviderAndWait(provider: brokenProvider)
wait(for: [errorExpectation], timeout: 2)
await fulfillment(of: [errorExpectation], timeout: 2)
errorProviderExpectation.fulfill()
}

Expand Down
5 changes: 3 additions & 2 deletions Tests/OpenFeatureTests/FlagEvaluationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ final class FlagEvaluationTests: XCTestCase {
}

OpenFeatureAPI.shared.setProvider(provider: provider)
wait(for: [readyExpectation], timeout: 5)
await fulfillment(of: [readyExpectation], timeout: 5)
let client = OpenFeatureAPI.shared.getClient()
let key = "key"
let booleanDetails = FlagEvaluationDetails(
Expand Down Expand Up @@ -189,7 +189,7 @@ final class FlagEvaluationTests: XCTestCase {
}

OpenFeatureAPI.shared.setProvider(provider: provider)
wait(for: [readyExpectation], timeout: 5)
await fulfillment(of: [readyExpectation], timeout: 5)

let client = OpenFeatureAPI.shared.getClient()

Expand Down Expand Up @@ -268,6 +268,7 @@ final class FlagEvaluationTests: XCTestCase {
XCTAssertEqual(details.errorCode, .providerFatal)
XCTAssertEqual(details.reason, Reason.error.rawValue)
XCTAssertEqual(details.errorMessage, "A fatal error occurred in the provider: Always broken")
XCTAssertNotNil(eventState)
}

func testClientMetadata() {
Expand Down

0 comments on commit a21214e

Please sign in to comment.