Skip to content

Commit

Permalink
Add test plan and explicitly disable tests instead of using an unders…
Browse files Browse the repository at this point in the history
…core
  • Loading branch information
moglistree committed Aug 5, 2024
1 parent dfad16c commit 4bd8176
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 8 deletions.
89 changes: 89 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/Flow.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Flow"
BuildableName = "Flow"
BlueprintName = "Flow"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Flow.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FlowTests"
BuildableName = "FlowTests"
BlueprintName = "FlowTests"
ReferencedContainer = "container:">
</BuildableReference>
<SkippedTests>
<Test
Identifier = "FutureBasicTests/testRecursiveMapCancel()">
</Test>
</SkippedTests>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Flow"
BuildableName = "Flow"
BlueprintName = "Flow"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
34 changes: 34 additions & 0 deletions Flow.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"configurations" : [
{
"id" : "CC1330D0-BFB1-4ED1-A5E3-361E83C2FEF9",
"name" : "Test Scheme Action",
"options" : {

}
}
],
"defaultOptions" : {

},
"testTargets" : [
{
"skippedTests" : [
"FutureBasicTests\/testRecursiveFlatMapCancel()",
"FutureBasicTests\/testRecursiveImmediateFlatMap()",
"FutureBasicTests\/testRecursiveImmediateMap()",
"FutureBasicTests\/testRecursiveMapCancel()",
"FutureRepeatTests\/testRepeatForeverDelayStackOverflowMain()",
"FutureRepeatTests\/testRepeatForeverStackOverflowBackground()",
"SignalProviderTests\/testExclusiveMultiThread()",
"SignalProviderTests\/testStartWithTheRetriggerWithinOnEventMerge()"
],
"target" : {
"containerPath" : "container:",
"identifier" : "FlowTests",
"name" : "FlowTests"
}
}
],
"version" : 1
}
8 changes: 4 additions & 4 deletions FlowTests/FutureBasicTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class FutureBasicTests: FutureTest {
}
}

func _testRecursiveImmediateFlatMap() {
func testRecursiveImmediateFlatMap() {
testFuture(timeout: 1000) { () -> Future<Int> in
func test(_ val: Int) -> Future<Int> {
if val > 0 {
Expand All @@ -256,7 +256,7 @@ class FutureBasicTests: FutureTest {
}
}

func _testRecursiveImmediateMap() {
func testRecursiveImmediateMap() {
testFuture(timeout: 1000) { () -> Future<Int> in
var f = Future(4711).delay(by: 1)
for _ in 1...100000 {
Expand Down Expand Up @@ -294,7 +294,7 @@ class FutureBasicTests: FutureTest {
}
}

func _testRecursiveMapCancel() {
func testRecursiveMapCancel() {
testFuture(timeout: 1000) { () -> Future<Int> in
var f = Future(4711).delay(by: 1)
for _ in 1...10000 {
Expand All @@ -305,7 +305,7 @@ class FutureBasicTests: FutureTest {
}
}

func _testRecursiveFlatMapCancel() {
func testRecursiveFlatMapCancel() {
testFuture(timeout: 1000) { () -> Future<Int> in
var f = Future(4711).delay(by: 1)
for _ in 1...10000 {
Expand Down
4 changes: 2 additions & 2 deletions FlowTests/FutureRepeatTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class FutureRepeatTests: FutureTest {

// Not sure it we can always catch up?
// With new immediate repeat handling this one will never come past repeatForever()
func _testRepeatForeverDelayStackOverflowMain() {
func testRepeatForeverDelayStackOverflowMain() {
testFuture(repeatCount: 0, timeout: 2, allDoneDelay: 2, cancelAfterDelay: 0.1) { () -> Future<Int> in
let f = Future(1).onResultRepeat()
return f
Expand All @@ -177,7 +177,7 @@ class FutureRepeatTests: FutureTest {
}

// cancel seems to never be able to catch up
func _testRepeatForeverStackOverflowBackground() {
func testRepeatForeverStackOverflowBackground() {
testFuture(repeatCount: 0, timeout: 2, allDoneDelay: 20, cancelAfterDelay: 0.1) { () -> Future<Int> in
let f = Future(1).onValue(on: .concurrentBackground) { _ in }.onResultRepeat()
return f
Expand Down
4 changes: 2 additions & 2 deletions FlowTests/SignalProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ class SignalProviderTests: XCTestCase {
XCTAssertTrue(vals[1] == (2, 3))
}

func _testStartWithTheRetriggerWithinOnEventMerge() { /// Sometime fails sometime not.
func testStartWithTheRetriggerWithinOnEventMerge() { /// Sometime fails sometime not.
for _ in 0..<1 {
let bag = DisposeBag()
let callbacker = Callbacker<Int>()
Expand Down Expand Up @@ -1710,7 +1710,7 @@ class SignalProviderTests: XCTestCase {
XCTAssertEqual(result, [1, 2])
}

func _testExclusiveMultiThread() {
func testExclusiveMultiThread() {
for _ in 0..<1000 {
let callbacker = Callbacker<Int>()
var result = [Int]()
Expand Down

0 comments on commit 4bd8176

Please sign in to comment.