Skip to content
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

Merged
merged 5 commits into from
Jun 16, 2023
Merged

Make all tests async #545

merged 5 commits into from
Jun 16, 2023

Conversation

adam-fowler
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #545 (118d3c8) into 7.x.x (118d3c8) will not change coverage.
The diff coverage is n/a.

❗ Current head 118d3c8 differs from pull request most recent head 23e9e49. Consider uploading reports for the commit 23e9e49 to get more accurate results

@@           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

Copy link
Member

@0xTim 0xTim left a 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()
Copy link
Member

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 {
Copy link
Member

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, *)
Copy link
Member

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?

Copy link
Member Author

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, *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above

@adam-fowler adam-fowler merged commit 1919b32 into 7.x.x Jun 16, 2023
@adam-fowler adam-fowler deleted the async-tests branch June 16, 2023 17:20
adam-fowler added a commit that referenced this pull request Jun 18, 2023
* 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
adam-fowler added a commit that referenced this pull request Jul 5, 2023
* 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
adam-fowler added a commit that referenced this pull request Jul 5, 2023
* 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
adam-fowler added a commit that referenced this pull request Jul 5, 2023
* 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
adam-fowler added a commit that referenced this pull request Jul 5, 2023
* 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
adam-fowler added a commit that referenced this pull request Jul 24, 2023
* 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
adam-fowler added a commit that referenced this pull request Jul 29, 2023
* 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
adam-fowler added a commit that referenced this pull request Aug 12, 2023
* 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
adam-fowler added a commit that referenced this pull request Dec 24, 2023
* 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
adam-fowler added a commit that referenced this pull request Apr 5, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants