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
[EventEngine] Refactoring the EventEngine Test Suite: Part 1 #32127
Conversation
This reverts commit d5c1219.
Automated fix for refs/heads/ee-test-suite-refactor
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.
Mostly lgtm. Left a few suggestions
@@ -241,5 +217,29 @@ ConnectionManager::CreateConnection(std::string target_addr, | |||
return absl::CancelledError("Failed to create connection."); | |||
} | |||
|
|||
// Returns a random message with bounded length. | |||
std::string GetNextSendMessage() { |
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.
Any specific reason why this function was moved to the end of this file from the beginning of the file ?
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.
No, it was a merge artifact, we had both done similar changes here. I've moved it back up near the top.
@@ -132,7 +131,38 @@ class ConnectionManager { | |||
std::unique_ptr<EventEngine> oracle_event_engine_; | |||
}; | |||
|
|||
void AppendStringToSliceBuffer(SliceBuffer* buf, absl::string_view data); | |||
|
|||
std::string ExtractSliceBufferIntoString(SliceBuffer* buf); |
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 think ExtractSliceBufferIntoString is declared twice: here and in line 136.
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.
Good catch, fixed
@@ -1,5 +1,7 @@ | |||
A reusable test suite for EventEngine implementations. | |||
|
|||
# Customizing tests for your EventEngine implementation | |||
|
|||
To exercise a custom EventEngine, create a new bazel test target that links | |||
against the `//test/core/event_engine/test_suite:complete` library, and provide |
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.
//test/core/event_engine/test_suite:complete appears to be deleted. Does this line still hold true ?
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.
Documentation updated, thanks.
namespace grpc_event_engine { | ||
namespace experimental { | ||
|
||
void InitClientTests() {} |
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.
What is expected to go in this function implementation ?
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.
Nothing, unfortunately. This bit of code allows fix_build_deps
to see a source file dependency between the custom test specifications and the test suite test implementations. They were previously only associated at link-time, which is fundamentally opposed to what fix_build_deps
is trying to do. Without this hack, the tests themselves get removed from the test suite targets.
) * Add back EventEngine test suite tools (echo binary) This reverts commit d5c1219. * more refactoring * fix * Automated change: Fix sanity tests * fix * fix posix oracle build def * fix FuzzingEventEngine includes * sanitize * tidy and rm DNS * fix cfstream includes * header guards * format & fix deps * fix * fix * iwyu * fix * remove redundant code * reviewer feedback Co-authored-by: drfloob <drfloob@users.noreply.github.com>
* Add back EventEngine test suite tools (echo binary) This reverts commit d5c1219. * more refactoring * fix * Automated change: Fix sanity tests * fix * fix posix oracle build def * fix FuzzingEventEngine includes * sanitize * tidy and rm DNS * fix cfstream includes * header guards * format & fix deps * fix * fix * iwyu * fix * remove redundant code * reviewer feedback Co-authored-by: drfloob <drfloob@users.noreply.github.com>
This is a partial refactoring, shortened to support @ctiller's work improving fix_build_deps.
Known limitations:
temporary locations for some EventEngine test utils should likely be moved into the src tree