aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-12-21 16:42:15 -0800
committerGravatar GitHub <noreply@github.com>2018-12-21 16:42:15 -0800
commit0f5b1d6bdfab97fd3490142a837c48e768027111 (patch)
tree0ab98492745eba8d3eea10c61dd48d9665a5574a /test
parent00fb17aa9705d243b934cd614cef3bfaa88c61e2 (diff)
parent15460eb3c9f58ba7f8a4db9bebff0aaa00b57d27 (diff)
Merge pull request #17536 from yashykt/fathom
Avoid taking refs on the stream by getting a copy of the context
Diffstat (limited to 'test')
-rw-r--r--test/core/transport/chttp2/context_list_test.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/core/transport/chttp2/context_list_test.cc b/test/core/transport/chttp2/context_list_test.cc
index edbe658a89..0379eaaee4 100644
--- a/test/core/transport/chttp2/context_list_test.cc
+++ b/test/core/transport/chttp2/context_list_test.cc
@@ -36,8 +36,12 @@ namespace {
const uint32_t kByteOffset = 123;
-void TestExecuteFlushesListVerifier(void* arg, grpc_core::Timestamps* ts) {
+void* DummyArgsCopier(void* arg) { return arg; }
+
+void TestExecuteFlushesListVerifier(void* arg, grpc_core::Timestamps* ts,
+ grpc_error* error) {
ASSERT_NE(arg, nullptr);
+ EXPECT_EQ(error, GRPC_ERROR_NONE);
EXPECT_EQ(ts->byte_offset, kByteOffset);
gpr_atm* done = reinterpret_cast<gpr_atm*>(arg);
gpr_atm_rel_store(done, static_cast<gpr_atm>(1));
@@ -52,6 +56,7 @@ void discard_write(grpc_slice slice) {}
TEST(ContextList, ExecuteFlushesList) {
grpc_core::ContextList* list = nullptr;
grpc_http2_set_write_timestamps_callback(TestExecuteFlushesListVerifier);
+ grpc_http2_set_fn_get_copied_context(DummyArgsCopier);
const int kNumElems = 5;
grpc_core::ExecCtx exec_ctx;
grpc_stream_refcount ref;