Skip to content
Draft
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
21 changes: 21 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,24 @@ jobs:
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
with:
linux_5_9_enabled: false

split-build-test:
name: Build and test separately
runs-on: ubuntu-latest
container:
image: "swiftlang/swift:nightly-main-jammy"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build
run: |
swift build --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
- name: Test
run: |
swift test --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
31 changes: 31 additions & 0 deletions Tests/DistributedActorsTestKitTests/ActorTestKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,42 @@
//
//===----------------------------------------------------------------------===//

#if os(Linux)
@preconcurrency import Glibc
#endif
import XCTest

@testable import DistributedActorsTestKit
@testable import DistributedCluster

final class _ForceFlush1StartTest: XCTestCase {
override class func setUp() {
super.setUp()

fflush(stdout)
fflush(stderr)
for channel in [0, 1] as [Int32] {
write(channel, Array(repeating: UInt8(ascii: "_"), count: 32*1024) + [UInt8(ascii: "\n"), 0], 32*1024 + 2)
}
}

func test() {}
}

final class Z_ForceFlush1EndTest: XCTestCase {
override class func setUp() {
super.setUp()

fflush(stdout)
fflush(stderr)
for channel in [0, 1] as [Int32] {
write(channel, Array(repeating: UInt8(ascii: "_"), count: 32*1024) + [UInt8(ascii: "\n"), 0], 32*1024 + 2)
}
}

func test() {}
}

final class ActorTestKitTests: XCTestCase {
var system: ClusterSystem!
var testKit: ActorTestKit!
Expand Down
32 changes: 32 additions & 0 deletions Tests/DistributedClusterTests/ActorRefAdapterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,44 @@
//
//===----------------------------------------------------------------------===//

#if os(Linux)
@preconcurrency import Glibc
#endif

import DistributedActorsTestKit
import Foundation
import XCTest

@testable import DistributedCluster

final class __ForceFlush2StartTest: XCTestCase {
override class func setUp() {
super.setUp()

fflush(stdout)
fflush(stderr)
for channel in [0, 1] as [Int32] {
write(channel, Array(repeating: UInt8(ascii: "_"), count: 32*1024) + [UInt8(ascii: "\n"), 0], 32*1024 + 2)
}
}

func test() {}
}

final class Z_ForceFlush2EndTest: XCTestCase {
override class func setUp() {
super.setUp()

fflush(stdout)
fflush(stderr)
for channel in [0, 1] as [Int32] {
write(channel, Array(repeating: UInt8(ascii: "_"), count: 32*1024) + [UInt8(ascii: "\n"), 0], 32*1024 + 2)
}
}

func test() {}
}

class _ActorRefAdapterTests: SingleClusterSystemXCTestCase {
func test_adaptedRef_shouldConvertMessages() throws {
let probe = self.testKit.makeTestProbe(expecting: String.self)
Expand Down
Loading