-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Make all tests async #545
Make all tests async #545
Conversation
Codecov Report
@@ Coverage Diff @@
## 7.x.x #545 +/- ##
=======================================
Coverage 77.12% 77.12%
=======================================
Files 87 87
Lines 8551 8551
=======================================
Hits 6595 6595
Misses 1956 1956 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments but overall good
@@ -401,14 +399,14 @@ class AWSClientTests: XCTestCase { | |||
let threadPool = NIOThreadPool(numberOfThreads: 3) | |||
threadPool.start() | |||
let fileIO = NonBlockingFileIO(threadPool: threadPool) | |||
let fileHandle = try fileIO.openFile(path: filename, mode: .read, eventLoop: httpClient.eventLoopGroup.next()).wait() | |||
let fileHandle = try await fileIO.openFile(path: filename, mode: .read, eventLoop: httpClient.eventLoopGroup.next()).get() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could really do with a new async version of FileIO, preferably with an AsyncSequence
eventLoop.flatSubmit { | ||
return self.callback(eventLoop).map { $0 } | ||
} | ||
func getCredential(on eventLoop: EventLoop, logger: Logger) async throws -> Credential { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming passing the event loop will disappear in a future API
@@ -18,7 +18,8 @@ import SotoCore | |||
import SotoTestUtils | |||
import XCTest | |||
|
|||
class EndpointDiscoveryTests: XCTestCase { | |||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this in Soto 7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The next PR will fix these
import NIOCore | ||
import NIOPosix | ||
@testable import SotoCore | ||
import SotoTestUtils | ||
import XCTest | ||
|
||
class PaginateTests: XCTestCase { | ||
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
* make Credential Provider tests async * Make all AWSClient tests async * Make endpoint, service, middleware logging tests async * Make paginate, payload and waiter tests async * Last non async call
No description provided.