load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")
oncall("fbcode_entropy_wardens_folly")
cpp_unittest(
name = "channel_processor_test",
srcs = ["ChannelProcessorTest.cpp"],
deps = [
"//folly/channels:channel_processor",
"//folly/executors:manual_executor",
"//folly/portability:gmock",
],
)
cpp_unittest(
name = "channel_test",
srcs = ["ChannelTest.cpp"],
supports_static_listing = False,
deps = [
"//folly/channels:channel",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/experimental/coro:blocking_wait",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "fanout_channel_test",
srcs = ["FanoutChannelTest.cpp"],
deps = [
"//folly/channels:consume_channel",
"//folly/channels:fanout_channel",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/executors:serial_executor",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "fanout_sender_test",
srcs = ["FanoutSenderTest.cpp"],
deps = [
"//folly/channels:consume_channel",
"//folly/channels:fanout_sender",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/executors:serial_executor",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "max_concurrent_rate_limiter_test",
srcs = [
"MaxConcurrentRateLimiterTest.cpp",
],
deps = [
"//folly/channels:max_concurrent_rate_limiter",
"//folly/executors:manual_executor",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "merge_channel_test",
srcs = [
"MergeChannelTest.cpp",
],
deps = [
"//folly/channels:consume_channel",
"//folly/channels:merge_channel",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/executors:serial_executor",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "merge_test",
srcs = ["MergeTest.cpp"],
deps = [
"//folly/channels:consume_channel",
"//folly/channels:merge",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/executors:serial_executor",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "multiplex_channel_test",
srcs = ["MultiplexChannelTest.cpp"],
deps = [
"//folly/channels:consume_channel",
"//folly/channels:max_concurrent_rate_limiter",
"//folly/channels:multiplex_channel",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/executors:serial_executor",
"//folly/experimental/coro:blocking_wait",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "producer_test",
srcs = ["ProducerTest.cpp"],
deps = [
"//folly/channels:producer",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "proxy_channel_test",
srcs = ["ProxyChannelTest.cpp"],
deps = [
"//folly/channels:proxy_channel",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_unittest(
name = "transform_test",
srcs = ["TransformTest.cpp"],
deps = [
"//folly:scope_guard",
"//folly:synchronized",
"//folly/channels:consume_channel",
"//folly/channels:max_concurrent_rate_limiter",
"//folly/channels:transform",
"//folly/channels/test:channel_test_util",
"//folly/executors:manual_executor",
"//folly/executors:serial_executor",
"//folly/experimental/coro:async_generator",
"//folly/experimental/coro:detach_on_cancel",
"//folly/portability:gmock",
"//folly/portability:gtest",
],
)
cpp_library(
name = "channel_test_util",
headers = ["ChannelTestUtil.h"],
exported_deps = [
"//folly/channels:consume_channel",
"//folly/executors:cpu_thread_pool_executor",
"//folly/executors:io_thread_pool_executor",
"//folly/executors:sequenced_executor",
"//folly/experimental/coro:detach_on_cancel",
"//folly/experimental/coro:sleep",
"//folly/futures:shared_promise",
"//folly/portability:gmock",
],
)