Skip to content

Commit e9def08

Browse files
committed
Disable flaky tests for watchOS
1 parent 653bd1d commit e9def08

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

Tests/ExportersTests/DatadogExporter/DatadogExporterTests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ class DatadogExporterTests: XCTestCase {
1818
}
1919

2020
func testWhenExportSpanIsCalled_thenTraceAndLogsAreUploaded() throws {
21+
if #available(watchOS 3.0, *) {
22+
throw XCTSkip("Test is flaky on watchOS")
23+
}
24+
2125
var logsSent = false
2226
var tracesSent = false
2327
let expecTrace = expectation(description: "trace received")
@@ -95,6 +99,10 @@ class DatadogExporterTests: XCTestCase {
9599
}
96100

97101
func testWhenExportMetricIsCalled_thenMetricsAreUploaded() throws {
102+
if #available(watchOS 3.0, *) {
103+
throw XCTSkip("Test is flaky on watchOS")
104+
}
105+
98106
var metricsSent = false
99107
let expecMetrics = expectation(description: "metrics received")
100108
expecMetrics.assertForOverFulfill = false

Tests/ExportersTests/DatadogExporter/Logs/LogsExporterTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ class LogsExporterTests: XCTestCase {
1818
}
1919

2020
func testWhenExportSpanIsCalledAndSpanHasEvent_thenLogIsUploaded() throws {
21+
if #available(watchOS 3.0, *) {
22+
throw XCTSkip("Test is flaky on watchOS")
23+
}
24+
2125
var logsSent = false
2226
let expec = expectation(description: "logs received")
2327
let server = HttpTestServer(url: URL(string: "http://localhost:33333"),

Tests/ExportersTests/DatadogExporter/Spans/SpansExporterTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ class SpansExporterTests: XCTestCase {
1818
}
1919

2020
func testWhenExportSpanIsCalled_thenTraceIsUploaded() throws {
21+
if #available(watchOS 3.0, *) {
22+
throw XCTSkip("Test is flaky on watchOS")
23+
}
24+
2125
var tracesSent = false
2226
let expec = expectation(description: "traces received")
2327
let server = HttpTestServer(url: URL(string: "http://localhost:33333"),

Tests/OpenTelemetrySdkTests/Metrics/CounterTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ final class CounterTests: XCTestCase {
129129
XCTAssertNil(testCounter.boundInstruments[ls3])
130130
}
131131

132-
public func testIntCounterBoundInstrumentsStatusUpdatedCorrectlyMultiThread() {
132+
public func testIntCounterBoundInstrumentsStatusUpdatedCorrectlyMultiThread() throws {
133+
if #available(watchOS 3.0, *) {
134+
throw XCTSkip("Test is flaky on watchOS")
135+
}
136+
133137
let testProcessor = TestMetricProcessor()
134138
let meter = MeterProviderSdk(metricProcessor: testProcessor, metricExporter: NoopMetricExporter()).get(instrumentationName: "scope1") as! MeterSdk
135139
let testCounter = meter.createIntCounter(name: "testCounter").internalCounter as! CounterMetricSdk<Int>

0 commit comments

Comments
 (0)