Skip to content

Commit

Permalink
Revert "Make all tests discoverable on Linux (grpc#1399)"
Browse files Browse the repository at this point in the history
This reverts commit 555b004.
  • Loading branch information
glbrntt committed May 6, 2022
1 parent 95732cd commit 0e7a822
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 334 deletions.
192 changes: 0 additions & 192 deletions Tests/GRPCTests/FunctionalTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,108 +259,12 @@ class FunctionalTestsAnonymousClient: FunctionalTestsInsecureTransport {
override var transportSecurity: TransportSecurity {
return .anonymousClient
}

override func testUnary() throws {
try super.testUnary()
}

override func testUnaryLotsOfRequests() throws {
try super.testUnaryLotsOfRequests()
}

override func testUnaryWithLargeData() throws {
try super.testUnaryWithLargeData()
}

override func testUnaryEmptyRequest() throws {
try super.testUnaryEmptyRequest()
}

override func testClientStreaming() {
super.testClientStreaming()
}

override func testClientStreamingLotsOfMessages() throws {
try super.testClientStreamingLotsOfMessages()
}

override func testServerStreaming() {
super.testServerStreaming()
}

override func testServerStreamingLotsOfMessages() {
super.testServerStreamingLotsOfMessages()
}

override func testBidirectionalStreamingBatched() throws {
try super.testBidirectionalStreamingBatched()
}

override func testBidirectionalStreamingPingPong() throws {
try super.testBidirectionalStreamingPingPong()
}

override func testBidirectionalStreamingLotsOfMessagesBatched() throws {
try super.testBidirectionalStreamingLotsOfMessagesBatched()
}

override func testBidirectionalStreamingLotsOfMessagesPingPong() throws {
try super.testBidirectionalStreamingLotsOfMessagesPingPong()
}
}

class FunctionalTestsMutualAuthentication: FunctionalTestsInsecureTransport {
override var transportSecurity: TransportSecurity {
return .mutualAuthentication
}

override func testUnary() throws {
try super.testUnary()
}

override func testUnaryLotsOfRequests() throws {
try super.testUnaryLotsOfRequests()
}

override func testUnaryWithLargeData() throws {
try super.testUnaryWithLargeData()
}

override func testUnaryEmptyRequest() throws {
try super.testUnaryEmptyRequest()
}

override func testClientStreaming() {
super.testClientStreaming()
}

override func testClientStreamingLotsOfMessages() throws {
try super.testClientStreamingLotsOfMessages()
}

override func testServerStreaming() {
super.testServerStreaming()
}

override func testServerStreamingLotsOfMessages() {
super.testServerStreamingLotsOfMessages()
}

override func testBidirectionalStreamingBatched() throws {
try super.testBidirectionalStreamingBatched()
}

override func testBidirectionalStreamingPingPong() throws {
try super.testBidirectionalStreamingPingPong()
}

override func testBidirectionalStreamingLotsOfMessagesBatched() throws {
try super.testBidirectionalStreamingLotsOfMessagesBatched()
}

override func testBidirectionalStreamingLotsOfMessagesPingPong() throws {
try super.testBidirectionalStreamingLotsOfMessagesPingPong()
}
}
#endif // canImport(NIOSSL)

Expand Down Expand Up @@ -460,108 +364,12 @@ class FunctionalTestsAnonymousClientNIOTS: FunctionalTestsInsecureTransportNIOTS
override var transportSecurity: TransportSecurity {
return .anonymousClient
}

override func testUnary() throws {
try super.testUnary()
}

override func testUnaryLotsOfRequests() throws {
try super.testUnaryLotsOfRequests()
}

override func testUnaryWithLargeData() throws {
try super.testUnaryWithLargeData()
}

override func testUnaryEmptyRequest() throws {
try super.testUnaryEmptyRequest()
}

override func testClientStreaming() {
super.testClientStreaming()
}

override func testClientStreamingLotsOfMessages() throws {
try super.testClientStreamingLotsOfMessages()
}

override func testServerStreaming() {
super.testServerStreaming()
}

override func testServerStreamingLotsOfMessages() {
super.testServerStreamingLotsOfMessages()
}

override func testBidirectionalStreamingBatched() throws {
try super.testBidirectionalStreamingBatched()
}

override func testBidirectionalStreamingPingPong() throws {
try super.testBidirectionalStreamingPingPong()
}

override func testBidirectionalStreamingLotsOfMessagesBatched() throws {
try super.testBidirectionalStreamingLotsOfMessagesBatched()
}

override func testBidirectionalStreamingLotsOfMessagesPingPong() throws {
try super.testBidirectionalStreamingLotsOfMessagesPingPong()
}
}

@available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *)
class FunctionalTestsMutualAuthenticationNIOTS: FunctionalTestsInsecureTransportNIOTS {
override var transportSecurity: TransportSecurity {
return .mutualAuthentication
}

override func testUnary() throws {
try super.testUnary()
}

override func testUnaryLotsOfRequests() throws {
try super.testUnaryLotsOfRequests()
}

override func testUnaryWithLargeData() throws {
try super.testUnaryWithLargeData()
}

override func testUnaryEmptyRequest() throws {
try super.testUnaryEmptyRequest()
}

override func testClientStreaming() {
super.testClientStreaming()
}

override func testClientStreamingLotsOfMessages() throws {
try super.testClientStreamingLotsOfMessages()
}

override func testServerStreaming() {
super.testServerStreaming()
}

override func testServerStreamingLotsOfMessages() {
super.testServerStreamingLotsOfMessages()
}

override func testBidirectionalStreamingBatched() throws {
try super.testBidirectionalStreamingBatched()
}

override func testBidirectionalStreamingPingPong() throws {
try super.testBidirectionalStreamingPingPong()
}

override func testBidirectionalStreamingLotsOfMessagesBatched() throws {
try super.testBidirectionalStreamingLotsOfMessagesBatched()
}

override func testBidirectionalStreamingLotsOfMessagesPingPong() throws {
try super.testBidirectionalStreamingLotsOfMessagesPingPong()
}
}
#endif // canImport(NIOSSL)
76 changes: 0 additions & 76 deletions Tests/GRPCTests/GRPCInteroperabilityTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,81 +168,5 @@ class GRPCInsecureInteroperabilityTests: GRPCTestCase {
#if canImport(NIOSSL)
class GRPCSecureInteroperabilityTests: GRPCInsecureInteroperabilityTests {
override var useTLS: Bool { return true }

override func testEmptyUnary() {
super.testEmptyUnary()
}

override func testCacheableUnary() {
super.testCacheableUnary()
}

override func testLargeUnary() {
super.testLargeUnary()
}

override func testClientCompressedUnary() {
super.testClientCompressedUnary()
}

override func testServerCompressedUnary() {
super.testServerCompressedUnary()
}

override func testClientStreaming() {
super.testClientStreaming()
}

override func testClientCompressedStreaming() {
super.testClientCompressedStreaming()
}

override func testServerStreaming() {
super.testServerStreaming()
}

override func testServerCompressedStreaming() {
super.testServerCompressedStreaming()
}

override func testPingPong() {
super.testPingPong()
}

override func testEmptyStream() {
super.testEmptyStream()
}

override func testCustomMetadata() {
super.testCustomMetadata()
}

override func testStatusCodeAndMessage() {
super.testStatusCodeAndMessage()
}

override func testSpecialStatusAndMessage() {
super.testSpecialStatusAndMessage()
}

override func testUnimplementedMethod() {
super.testUnimplementedMethod()
}

override func testUnimplementedService() {
super.testUnimplementedService()
}

override func testCancelAfterBegin() {
super.testCancelAfterBegin()
}

override func testCancelAfterFirstResponse() {
super.testCancelAfterFirstResponse()
}

override func testTimeoutOnSleepingServer() {
super.testTimeoutOnSleepingServer()
}
}
#endif // canImport(NIOSSL)
86 changes: 20 additions & 66 deletions Tests/GRPCTests/ServerThrowingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,27 @@ class ServerThrowingTests: EchoTestCaseBase {
}

override func makeEchoProvider() -> Echo_EchoProvider { return ImmediateThrowingEchoProvider() }
}

class ServerDelayedThrowingTests: ServerThrowingTests {
override func makeEchoProvider() -> Echo_EchoProvider { return DelayedThrowingEchoProvider() }
}

class ClientThrowingWhenServerReturningErrorTests: ServerThrowingTests {
override func makeEchoProvider() -> Echo_EchoProvider { return ErrorReturningEchoProvider() }
}

class ServerErrorTransformingTests: ServerThrowingTests {
override var expectedError: GRPCStatus { return transformedError }
override var expectedMetadata: HPACKHeaders? {
return HPACKHeaders([("grpc-status", "10"), ("grpc-message", "transformed error"),
("transformed", "header")])
}

override func makeErrorDelegate() -> ServerErrorDelegate? { return ErrorTransformingDelegate() }
}

extension ServerThrowingTests {
func testUnary() throws {
let call = client.get(Echo_EchoRequest(text: "foo"))
XCTAssertEqual(self.expectedError, try call.status.wait())
Expand Down Expand Up @@ -202,69 +222,3 @@ class ServerThrowingTests: EchoTestCaseBase {
}
}
}

class ServerDelayedThrowingTests: ServerThrowingTests {
override func makeEchoProvider() -> Echo_EchoProvider { return DelayedThrowingEchoProvider() }

override func testUnary() throws {
try super.testUnary()
}

override func testClientStreaming() throws {
try super.testClientStreaming()
}

override func testServerStreaming() throws {
try super.testServerStreaming()
}

override func testBidirectionalStreaming() throws {
try super.testBidirectionalStreaming()
}
}

class ClientThrowingWhenServerReturningErrorTests: ServerThrowingTests {
override func makeEchoProvider() -> Echo_EchoProvider { return ErrorReturningEchoProvider() }

override func testUnary() throws {
try super.testUnary()
}

override func testClientStreaming() throws {
try super.testClientStreaming()
}

override func testServerStreaming() throws {
try super.testServerStreaming()
}

override func testBidirectionalStreaming() throws {
try super.testBidirectionalStreaming()
}
}

class ServerErrorTransformingTests: ServerThrowingTests {
override var expectedError: GRPCStatus { return transformedError }
override var expectedMetadata: HPACKHeaders? {
return HPACKHeaders([("grpc-status", "10"), ("grpc-message", "transformed error"),
("transformed", "header")])
}

override func makeErrorDelegate() -> ServerErrorDelegate? { return ErrorTransformingDelegate() }

override func testUnary() throws {
try super.testUnary()
}

override func testClientStreaming() throws {
try super.testClientStreaming()
}

override func testServerStreaming() throws {
try super.testServerStreaming()
}

override func testBidirectionalStreaming() throws {
try super.testBidirectionalStreaming()
}
}

0 comments on commit 0e7a822

Please sign in to comment.