-
Notifications
You must be signed in to change notification settings - Fork 133
fix test and a crash when closed #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,6 +320,23 @@ class ConnectionPoolTests: XCTestCase { | |
} | ||
} | ||
|
||
func testConnectFailedWhenClosed() { | ||
var state = HTTP1ConnectionProvider.ConnectionsState(eventLoop: self.eventLoop) | ||
var snapshot = state.testsOnly_getInternalState() | ||
snapshot.state = .closed | ||
state.testsOnly_setInternalState(snapshot) | ||
|
||
|
||
XCTAssertFalse(state.enqueue()) | ||
|
||
let action = state.connectFailed() | ||
switch action { | ||
case .none: | ||
break | ||
default: | ||
XCTFail("Unexpected action: \(action)") | ||
} | ||
} | ||
|
||
// MARK: - Release Tests | ||
|
||
func testReleaseAliveConnectionEmptyQueue() throws { | ||
|
Uh oh!
There was an error while loading. Please reload this page.