Skip to content

Commit 67ceba6

Browse files
committed
fix validate_docc script
1 parent a128fdf commit 67ceba6

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

Tests/DistributedActorsTests/ClusterSystemTests.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,27 @@ final class ClusterSystemTests: ClusterSystemXCTestCase {
164164
secondReceptacle.wait(atMost: .seconds(3))!.shouldBeNil()
165165
}
166166

167+
168+
func test_terminated_shouldBeResumedWhenSystemIsShutDown() async throws {
169+
let system = await ClusterSystem("ShutMeDown")
170+
let firstReceptacle = BlockingReceptacle<Error?>()
171+
172+
system.shutdown(afterShutdownCompleted: { error in
173+
firstReceptacle.offerOnce(error)
174+
})
175+
176+
firstReceptacle.wait(atMost: .seconds(3))!.shouldBeNil()
177+
178+
let secondReceptacle = BlockingReceptacle<Error?>()
179+
180+
system.shutdown(afterShutdownCompleted: { error in
181+
secondReceptacle.offerOnce(error)
182+
})
183+
184+
secondReceptacle.wait(atMost: .seconds(3))!.shouldBeNil()
185+
}
186+
187+
167188
func test_cleanUpAssociationTombstones() async throws {
168189
let local = await setUpNode("local") { settings in
169190
settings.enabled = true

scripts/docs/validate_docc.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ printf "\033[0;32mokay.\033[0m\n"
2525
printf "=> Checking docc: for unexpected warnings...\n"
2626

2727
module=DistributedActors
28-
docc_warnings=$(swift package generate-documentation --target $module | grep 'warning:')
28+
docc_warnings=$(swift package generate-documentation --target $module)
2929

30-
if [[ $(echo $docc_warnings | wc -l) -gt 0 ]];
30+
if [[ $(echo "$docc_warnings" | grep 'warning:' | wc -l) -gt 0 ]];
3131
then
3232
printf "\033[0;31mWarnings found docc documentation of '$module':\033[0m\n"
3333
echo $docc_warnings
3434
exit 1
35+
else
36+
printf "\033[0;32mokay.\033[0m\n"
37+
exit 0
3538
fi
36-
37-
printf "\033[0;32mokay.\033[0m\n"

0 commit comments

Comments
 (0)