The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

393 lines
15 KiB

// Copyright 2021 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/core/lib/promise/pipe.h"
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
#include <initializer_list>
#include <memory>
#include <tuple>
#include <utility>
#include "absl/status/status.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <grpc/event_engine/memory_allocator.h>
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
#include <grpc/grpc.h>
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/promise/activity.h"
#include "src/core/lib/promise/detail/basic_join.h"
#include "src/core/lib/promise/join.h"
#include "src/core/lib/promise/map.h"
#include "src/core/lib/promise/seq.h"
#include "src/core/lib/resource_quota/memory_quota.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "test/core/promise/test_wakeup_schedulers.h"
using testing::MockFunction;
using testing::StrictMock;
namespace grpc_core {
class PipeTest : public ::testing::Test {
protected:
MemoryAllocator memory_allocator_ = MemoryAllocator(
ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test"));
};
TEST_F(PipeTest, CanSendAndReceive) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<int>>();
return Seq(
// Concurrently: send 42 into the pipe, and receive from the pipe.
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Join(pipe->sender.Push(42),
Map(pipe->receiver.Next(),
[](NextResult<int> r) { return r.value(); })),
// Once complete, verify successful sending and the received value
// is 42.
[](std::tuple<bool, int> result) {
EXPECT_TRUE(std::get<0>(result));
EXPECT_EQ(42, std::get<1>(result));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
TEST_F(PipeTest, CanInterceptAndMapAtSender) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<int>>();
pipe->sender.InterceptAndMap([](int value) { return value / 2; });
return Seq(
// Concurrently: send 42 into the pipe, and receive from the pipe.
Join(pipe->sender.Push(42),
Map(pipe->receiver.Next(),
[](NextResult<int> r) { return r.value(); })),
// Once complete, verify successful sending and the received value
// is 21.
[](std::tuple<bool, int> result) {
EXPECT_TRUE(std::get<0>(result));
EXPECT_EQ(21, std::get<1>(result));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, CanInterceptAndMapAtReceiver) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<int>>();
pipe->receiver.InterceptAndMap([](int value) { return value / 2; });
return Seq(
// Concurrently: send 42 into the pipe, and receive from the pipe.
Join(pipe->sender.Push(42),
Map(pipe->receiver.Next(),
[](NextResult<int> r) { return r.value(); })),
// Once complete, verify successful sending and the received value
// is 21.
[](std::tuple<bool, int> result) {
EXPECT_TRUE(std::get<0>(result));
EXPECT_EQ(21, std::get<1>(result));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, InterceptionOrderingIsCorrect) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<std::string>>();
auto appender = [](char c) {
return [c](std::string value) {
value += c;
return value;
};
};
// Interception get added outwardly from the center, and run from sender
// to receiver, so the following should result in append "abcd".
pipe->receiver.InterceptAndMap(appender('c'));
pipe->sender.InterceptAndMap(appender('b'));
pipe->receiver.InterceptAndMap(appender('d'));
pipe->sender.InterceptAndMap(appender('a'));
return Seq(
// Concurrently: send "" into the pipe, and receive from the pipe.
Join(pipe->sender.Push(""),
Map(pipe->receiver.Next(),
[](NextResult<std::string> r) { return r.value(); })),
// Once complete, verify successful sending and the received value
// is 21.
[](std::tuple<bool, std::string> result) {
EXPECT_TRUE(std::get<0>(result));
EXPECT_EQ("abcd", std::get<1>(result));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, CanReceiveAndSend) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<int>>();
return Seq(
// Concurrently: receive from the pipe, and send 42 into the pipe.
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Join(Map(pipe->receiver.Next(),
[](NextResult<int> r) { return r.value(); }),
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
pipe->sender.Push(42)),
// Once complete, verify the received value is 42 and successful
// sending.
[](std::tuple<int, bool> result) {
EXPECT_EQ(std::get<0>(result), 42);
EXPECT_TRUE(std::get<1>(result));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, CanSeeClosedOnSend) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
Pipe<int> pipe;
auto sender = std::move(pipe.sender);
auto receiver = std::make_shared<std::unique_ptr<PipeReceiver<int>>>(
std::make_unique<PipeReceiver<int>>(std::move(pipe.receiver)));
return Seq(
// Concurrently:
// - push 43 into the sender, which will stall because there is no
// reader
// - and close the receiver, which will fail the pending send.
Join(sender.Push(43),
[receiver] {
receiver->reset();
return absl::OkStatus();
}),
// Verify both that the send failed and that we executed the close.
[](const std::tuple<bool, absl::Status>& result) {
EXPECT_EQ(result, std::make_tuple(false, absl::OkStatus()));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, CanSeeClosedOnReceive) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
Pipe<int> pipe;
auto sender = std::make_shared<std::unique_ptr<PipeSender<int>>>(
std::make_unique<PipeSender<int>>(std::move(pipe.sender)));
auto receiver = std::move(pipe.receiver);
return Seq(
// Concurrently:
// - wait for a received value (will stall forever since we push
// nothing into the queue)
// - close the sender, which will signal the receiver to return an
// end-of-stream.
Join(receiver.Next(),
[sender] {
sender->reset();
return absl::OkStatus();
}),
// Verify we received end-of-stream and closed the sender.
[](std::tuple<NextResult<int>, absl::Status> result) {
EXPECT_FALSE(std::get<0>(result).has_value());
EXPECT_EQ(std::get<1>(result), absl::OkStatus());
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
TEST_F(PipeTest, CanCloseSend) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<int>>();
return Seq(
// Concurrently:
// - wait for a received value (will stall forever since we push
// nothing into the queue)
// - close the sender, which will signal the receiver to return an
// end-of-stream.
Join(pipe->receiver.Next(),
[pipe]() mutable {
pipe->sender.Close();
return absl::OkStatus();
}),
// Verify we received end-of-stream and closed the sender.
[](std::tuple<NextResult<int>, absl::Status> result) {
EXPECT_FALSE(std::get<0>(result).has_value());
EXPECT_FALSE(std::get<0>(result).cancelled());
EXPECT_EQ(std::get<1>(result), absl::OkStatus());
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, CanCloseSendWithInterceptor) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<int>>();
pipe->sender.InterceptAndMap([](int value) { return value + 1; });
return Seq(
// Concurrently:
// - wait for a received value (will stall forever since we push
// nothing into the queue)
// - close the sender, which will signal the receiver to return an
// end-of-stream.
Join(pipe->receiver.Next(),
[pipe]() mutable {
pipe->sender.Close();
return absl::OkStatus();
}),
// Verify we received end-of-stream and closed the sender.
[](std::tuple<NextResult<int>, absl::Status> result) {
EXPECT_FALSE(std::get<0>(result).has_value());
EXPECT_FALSE(std::get<0>(result).cancelled());
EXPECT_EQ(std::get<1>(result), absl::OkStatus());
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, CanCancelSendWithInterceptor) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
MakeActivity(
[] {
auto* pipe = GetContext<Arena>()->ManagedNew<Pipe<int>>();
pipe->sender.InterceptAndMap([](int) { return absl::nullopt; });
return Seq(
// Concurrently:
// - wait for a received value (will stall forever since we push
// nothing into the queue)
// - close the sender, which will signal the receiver to return an
// end-of-stream.
Join(pipe->receiver.Next(), pipe->sender.Push(3)),
// Verify we received end-of-stream with cancellation and sent
// successfully.
[](std::tuple<NextResult<int>, bool> result) {
EXPECT_FALSE(std::get<0>(result).has_value());
EXPECT_TRUE(std::get<0>(result).cancelled());
EXPECT_FALSE(std::get<1>(result));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
}
TEST_F(PipeTest, CanFlowControlThroughManyStages) {
StrictMock<MockFunction<void(absl::Status)>> on_done;
EXPECT_CALL(on_done, Call(absl::OkStatus()));
auto done = std::make_shared<bool>(false);
// Push a value through multiple pipes.
// Ensure that it's possible to do so and get flow control throughout the
// entire pipe: ie that the push down does not complete until the last pipe
// completes.
MakeActivity(
[done] {
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
auto* pipe1 = GetContext<Arena>()->ManagedNew<Pipe<int>>();
auto* pipe2 = GetContext<Arena>()->ManagedNew<Pipe<int>>();
auto* pipe3 = GetContext<Arena>()->ManagedNew<Pipe<int>>();
auto* sender1 = &pipe1->sender;
auto* receiver1 = &pipe1->receiver;
auto* sender2 = &pipe2->sender;
auto* receiver2 = &pipe2->receiver;
auto* sender3 = &pipe3->sender;
auto* receiver3 = &pipe3->receiver;
return Seq(Join(Seq(sender1->Push(1),
[done] {
*done = true;
return 1;
}),
Seq(receiver1->Next(),
[sender2](NextResult<int> r) mutable {
return sender2->Push(r.value());
}),
Seq(receiver2->Next(),
[sender3](NextResult<int> r) mutable {
return sender3->Push(r.value());
}),
Seq(receiver3->Next(),
[done](NextResult<int> r) {
EXPECT_EQ(r.value(), 1);
EXPECT_FALSE(*done);
return 2;
})),
[](std::tuple<int, bool, bool, int> result) {
EXPECT_EQ(result, std::make_tuple(1, true, true, 2));
return absl::OkStatus();
});
},
NoWakeupScheduler(),
[&on_done](absl::Status status) { on_done.Call(std::move(status)); },
MakeScopedArena(1024, &memory_allocator_));
ASSERT_TRUE(*done);
}
} // namespace grpc_core
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
[promises] Server call (#31448) * add experiment * allow instantiation * scratchings * scratchings * sniffly * Automated change: Fix sanity tests * fix * fix * fix * Automated change: Fix sanity tests * progress * change pipe labels to enable server code to be written * better api * Automated change: Fix sanity tests * progress * [promises] Implementation of deadline for server-based-calls * compression filter compiles again * Automated change: Fix sanity tests * fix * server tracing fixes * get client initial metadata * progress * progress * server call surface progress * Automated change: Fix sanity tests * move payload * server-progress * recv-message-server-connchan * logging * fix context-gate * recv fix@top * Automated change: Fix sanity tests * recv close on server * top termination start * [promises] Move Empty to be first class * fixes * fix * flow control fix * got to orphan! * orphan * call orphan * spam cleanup * fix * new cancelation semantics * progress * large metadata fixes * fix * fix * log * better logs * fix-chanz * logging, necessaryness * fix typo * fixes * fix * fix * fix-pipe * cleanup logging * fix * build-fix * fix * Automated change: Fix sanity tests * logging * Automated change: Fix sanity tests * Automated change: Fix sanity tests * better primitive * Revert "better primitive" This reverts commit 119b5ee244763a88d2318bc5145065f4940a2295. * fix * fix * trrracing * Automated change: Fix sanity tests * get-trailing-metadata * cancellation * Automated change: Fix sanity tests * add transform pipeline to pipe * add transform pipeline to pipe * interceptor lists * new server initial md api into filters * convert connected_channel * convert call * initial promise based filter conversion * convert promise based filter * build fixes * compile fix * fixes * fix ordering * fixes * check-metadata * revert later: debug code * better debug * fix metadata ordering with messages in promise based filter * fix ordering problem between batch completion and promise completion * properly handle failure on receive message path on client * more debug, fix a repoll bug in pbf * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * cleanup logging * fixes * missing file * fixes * logging * Automated change: Fix sanity tests * fixes * convert logging filter * fix * Automated change: Fix sanity tests * fix bad server response test * Revert "Disable logging test (#32049)" This reverts commit 5fc92eaeae6f668ba7c2df1024f18ef8c798a319. * fix * Automated change: Fix sanity tests * fix memory leaks, logging * Automated change: Fix sanity tests * slice refcount debugging * asan-canaries * leak-fix * leak-fix * Automated change: Fix sanity tests * fix * fix * fix * fix * fix * Automated change: Fix sanity tests * fix * remove mistaken line * add-comment * fix refcounting bug * Automated change: Fix sanity tests * rename variable * renames * bleh * carry pipe close status from bottom of pipe to top to appease recv-close-on-server * backport cancellation * Revert "carry pipe close status from bottom of pipe to top to appease" This reverts commit fa33301dcddd01aff52d3bee77b16ffef9466de5. * fix * Automated change: Fix sanity tests * review-feedback * comment-ordering * monostate * renames * undo-review-feedback * fix * review-feedback * review-feedback * fix * review-feedback * drop debugloc constructor * interceptor-list-rev-feedback * interceptor-list-rev-feedback * pipe test * review-feedback * undo-mistaken-change * Automated change: Fix sanity tests * pipe error state * detect send/recv failures and report * iwyu, build * fix submodules * fix * warning * cleanup * Automated change: Fix sanity tests * fix * fix for windows * fix * null pointer fix * iwyu * gen projex --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
grpc_init();
int r = RUN_ALL_TESTS();
grpc_shutdown();
return r;
}