-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[e2e] Use SettableFutures instead of CompletableFuture #2854
Conversation
This works better for internal use cases.
5d17791
to
39fbe2c
Compare
public static CompletableFuture<Map<String, String>> testResults = new CompletableFuture<>(); | ||
private static final SettableFuture<Map<String, String>> testResultsSettable = | ||
SettableFuture.create(); | ||
public static final ListenableFuture<Map<String, String>> testResults = testResultsSettable; |
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.
Can we just make this be a Future
instead of needing to publicly export its type?
I'm a little concerned that at some point we'll have a reason to avoid using Guava for this, and we'll have to break people again. I'm also not clear on what benefits consumers get from having this be a ListenableFuture rather than just a Future.
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.
Got it, done
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.
LGTM
Thanks! |
Sorry, I've never done this before, should I follow https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md#the-release-process to release it onto pub? |
Yes. If you need permissions @kf6gpe can help |
Expose a `Future` for `testResults` instead. This works better for internal use cases.
Missed this earlier in flutter#2854
Expose a `Future` for `testResults` instead. This works better for internal use cases.
Missed this earlier in flutter#2854
Expose a `Future` for `testResults` instead. This works better for internal use cases.
Missed this earlier in flutter#2854
Description
This unblocks the import of the plugin internally.
Related Issues
b/160208320
Breaking Change
Breaking change if users depend on
E2EPlugin.testResults
as an instance ofCompletableFuture
.