Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/TemporalTestKit/TemporalTestServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public struct TemporalTestServer: Sendable {
/// - Returns: The result value returned by the closure.
/// - Throws: Any errors thrown by the closure or during server lifecycle management.
public static func withTestServer<Result: Sendable>(
_ body: (borrowing TemporalTestServer) async throws -> sending Result
) async throws -> sending Result {
_ body: (borrowing TemporalTestServer) async throws -> Result
) async throws -> Result {
try await BridgeTestServer.withBridgeDevServer(
devServerOptions: Self.devServerOptions,
) { bridgeTestServer, target in
Expand Down
2 changes: 0 additions & 2 deletions Tests/TemporalTests/Converters/DataConverterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ struct DataConverterTests {
}
}

#if compiler(>=6.2)
@Test
func convertVoidPayloads() async throws {
let dataConverter = DataConverter(
Expand All @@ -107,7 +106,6 @@ struct DataConverterTests {

#expect(void! == ())
}
#endif

@Test
func convertPayloads() async throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import TemporalTestKit
import Testing
import Tracing

#if !(os(Linux) && swift(>=6.2)) // TODO: reenable once Swift 6.2 compiler crash / Swift 6.1 runtime crash on Linux (in RELEASE only) is fixed
@Suite(.tags(.instrumentationTests))
struct TemporalClientOutboundTracingInterceptorTests {
@Workflow
Expand Down Expand Up @@ -165,4 +164,3 @@ struct TemporalClientOutboundTracingInterceptorTests {
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import Temporal
import Testing
import Tracing

#if !(os(Linux) && swift(>=6.2)) // TODO: reenable once Swift 6.2 compiler crash / Swift 6.1 runtime crash on Linux (in RELEASE only) is fixed
@Suite(.tags(.instrumentationTests))
struct TemporalWorkerOutboundTracingInterceptorTests {
@Workflow
Expand Down Expand Up @@ -74,18 +73,20 @@ struct TemporalWorkerOutboundTracingInterceptorTests {
).makeWorkflowOutboundInterceptor()
)

_ = try await interceptor.executeActivity(
input: ScheduleActivityInput(
name: Self.activityInfo.name,
options: ActivityOptions(
scheduleToCloseTimeout: Self.scheduleToCloseTimeout,
disableEagerActivityExecution: Self.disableEagerActivityExecution,
cancellationType: Self.cancellationType,
versioningIntent: Self.versioningIntent
),
headers: [:],
input: ()
let input = ScheduleActivityInput<Void>(
name: Self.activityInfo.name,
options: ActivityOptions(
scheduleToCloseTimeout: Self.scheduleToCloseTimeout,
disableEagerActivityExecution: Self.disableEagerActivityExecution,
cancellationType: Self.cancellationType,
versioningIntent: Self.versioningIntent
),
headers: [:],
input: ()
)

_ = try await interceptor.executeActivity(
input: input,
next: { input in
// Assert that headers contain the injected traceID
let traceHeaderPayload = try #require(
Expand Down Expand Up @@ -155,18 +156,20 @@ struct TemporalWorkerOutboundTracingInterceptorTests {
)

do {
_ = try await interceptor.executeActivity(
input: ScheduleActivityInput(
name: Self.activityInfo.name,
options: ActivityOptions(
scheduleToCloseTimeout: Self.scheduleToCloseTimeout,
disableEagerActivityExecution: Self.disableEagerActivityExecution,
cancellationType: Self.cancellationType,
versioningIntent: Self.versioningIntent
),
headers: [:],
input: ()
let input = ScheduleActivityInput<Void>(
name: Self.activityInfo.name,
options: ActivityOptions(
scheduleToCloseTimeout: Self.scheduleToCloseTimeout,
disableEagerActivityExecution: Self.disableEagerActivityExecution,
cancellationType: Self.cancellationType,
versioningIntent: Self.versioningIntent
),
headers: [:],
input: ()
)

_ = try await interceptor.executeActivity(
input: input,
next: { input in
// Assert that headers contain the injected traceID
let traceHeaderPayload = try #require(
Expand Down Expand Up @@ -204,4 +207,3 @@ struct TemporalWorkerOutboundTracingInterceptorTests {
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Synchronization
import Temporal
import Testing

#if !(os(Linux) && swift(>=6.2)) // TODO: reenable once Swift 6.2 compiler crash on Linux is fixed
extension TestServerDependentTests {
@Suite
struct ActivityInterceptorTests {
Expand Down Expand Up @@ -150,16 +149,15 @@ extension TestServerDependentTests {
) {
var i = 0
for d in repeat each input.details {
guard i == 0 else {
break
}

guard let first = d as? String else {
// This is written slightly mor complicated since currently
// early returns in `repeat each` loops are not allowed and
// result in SIL verification crashes
if let first = d as? String, i == 0 {
#expect(first == "Foo", #"First heartbeat detail wasn't "Foo""#)
i += 1
} else {
Issue.record("Wrong type passed to heartbeat first detail, expected `String`")
return
}
#expect(first == "Foo", #"First heartbeat detail wasn't "Foo""#)
i += 1
}

interceptor.counter.withLock { $0 += 1 }
Expand Down Expand Up @@ -228,4 +226,3 @@ extension TestServerDependentTests {
}
}
}
#endif