Skip to content

Commit

Permalink
all good! missing end2end test for new lr filter
Browse files Browse the repository at this point in the history
  • Loading branch information
dgquintas committed Apr 29, 2016
1 parent 396f445 commit b41363e
Show file tree
Hide file tree
Showing 25 changed files with 227 additions and 516 deletions.
20 changes: 8 additions & 12 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ cc_library(
cc_library(
name = "grpc",
srcs = [
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
Expand Down Expand Up @@ -214,7 +213,6 @@ cc_library(
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/load_reporting/load_reporting.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
Expand Down Expand Up @@ -287,14 +285,15 @@ cc_library(
"src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/rpc_metric_id.h",
"src/core/lib/surface/init.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
Expand Down Expand Up @@ -351,7 +350,6 @@ cc_library(
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/load_reporting/load_reporting.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
Expand Down Expand Up @@ -447,6 +445,8 @@ cc_library(
"src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/ext/census/context.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
Expand Down Expand Up @@ -508,7 +508,6 @@ cc_library(
cc_library(
name = "grpc_unsecure",
srcs = [
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
Expand Down Expand Up @@ -563,7 +562,6 @@ cc_library(
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/load_reporting/load_reporting.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
Expand Down Expand Up @@ -630,7 +628,6 @@ cc_library(
"src/core/ext/census/rpc_metric_id.h",
"src/core/lib/surface/init.c",
"src/core/lib/surface/init_unsecure.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
Expand Down Expand Up @@ -687,7 +684,6 @@ cc_library(
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/load_reporting/load_reporting.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
Expand Down Expand Up @@ -1315,7 +1311,6 @@ objc_library(
name = "grpc_objc",
srcs = [
"src/core/lib/surface/init.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
Expand Down Expand Up @@ -1372,7 +1367,6 @@ objc_library(
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/load_reporting/load_reporting.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
Expand Down Expand Up @@ -1468,6 +1462,8 @@ objc_library(
"src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/ext/census/context.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
Expand Down Expand Up @@ -1508,7 +1504,6 @@ objc_library(
"include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/census.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
Expand Down Expand Up @@ -1563,7 +1558,6 @@ objc_library(
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/load_reporting/load_reporting.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
Expand Down Expand Up @@ -1636,6 +1630,8 @@ objc_library(
"src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
Expand Down
44 changes: 4 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,6 @@ json_stream_error_test: $(BINDIR)/$(CONFIG)/json_stream_error_test
json_test: $(BINDIR)/$(CONFIG)/json_test
lame_client_test: $(BINDIR)/$(CONFIG)/lame_client_test
lb_policies_test: $(BINDIR)/$(CONFIG)/lb_policies_test
load_reporting_registration_test: $(BINDIR)/$(CONFIG)/load_reporting_registration_test
low_level_ping_pong_benchmark: $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark
message_compress_test: $(BINDIR)/$(CONFIG)/message_compress_test
mlog_test: $(BINDIR)/$(CONFIG)/mlog_test
Expand Down Expand Up @@ -1285,7 +1284,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/json_test \
$(BINDIR)/$(CONFIG)/lame_client_test \
$(BINDIR)/$(CONFIG)/lb_policies_test \
$(BINDIR)/$(CONFIG)/load_reporting_registration_test \
$(BINDIR)/$(CONFIG)/message_compress_test \
$(BINDIR)/$(CONFIG)/mlog_test \
$(BINDIR)/$(CONFIG)/multiple_server_queues_test \
Expand Down Expand Up @@ -1592,8 +1590,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/json_test || ( echo test json_test failed ; exit 1 )
$(E) "[RUN] Testing lame_client_test"
$(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 )
$(E) "[RUN] Testing load_reporting_registration_test"
$(Q) $(BINDIR)/$(CONFIG)/load_reporting_registration_test || ( echo test load_reporting_registration_test failed ; exit 1 )
$(E) "[RUN] Testing message_compress_test"
$(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 )
$(E) "[RUN] Testing multiple_server_queues_test"
Expand Down Expand Up @@ -2480,7 +2476,6 @@ endif

LIBGRPC_SRC = \
src/core/lib/surface/init.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/lib/channel/channel_args.c \
src/core/lib/channel/channel_stack.c \
src/core/lib/channel/channel_stack_builder.c \
Expand Down Expand Up @@ -2537,7 +2532,6 @@ LIBGRPC_SRC = \
src/core/lib/json/json_reader.c \
src/core/lib/json/json_string.c \
src/core/lib/json/json_writer.c \
src/core/lib/load_reporting/load_reporting.c \
src/core/lib/surface/alarm.c \
src/core/lib/surface/api_trace.c \
src/core/lib/surface/byte_buffer.c \
Expand Down Expand Up @@ -2636,6 +2630,8 @@ LIBGRPC_SRC = \
src/core/ext/lb_policy/round_robin/round_robin.c \
src/core/ext/resolver/dns/native/dns_resolver.c \
src/core/ext/resolver/sockaddr/sockaddr_resolver.c \
src/core/ext/load_reporting/load_reporting.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/ext/census/context.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
Expand Down Expand Up @@ -2823,7 +2819,6 @@ endif
LIBGRPC_UNSECURE_SRC = \
src/core/lib/surface/init.c \
src/core/lib/surface/init_unsecure.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/lib/channel/channel_args.c \
src/core/lib/channel/channel_stack.c \
src/core/lib/channel/channel_stack_builder.c \
Expand Down Expand Up @@ -2880,7 +2875,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/json/json_reader.c \
src/core/lib/json/json_string.c \
src/core/lib/json/json_writer.c \
src/core/lib/load_reporting/load_reporting.c \
src/core/lib/surface/alarm.c \
src/core/lib/surface/api_trace.c \
src/core/lib/surface/byte_buffer.c \
Expand Down Expand Up @@ -8552,38 +8546,6 @@ endif
endif


LOAD_REPORTING_REGISTRATION_TEST_SRC = \
test/core/load_reporting/load_reporting_registration.c \

LOAD_REPORTING_REGISTRATION_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LOAD_REPORTING_REGISTRATION_TEST_SRC))))
ifeq ($(NO_SECURE),true)

# You can't build secure targets if you don't have OpenSSL.

$(BINDIR)/$(CONFIG)/load_reporting_registration_test: openssl_dep_error

else



$(BINDIR)/$(CONFIG)/load_reporting_registration_test: $(LOAD_REPORTING_REGISTRATION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(LOAD_REPORTING_REGISTRATION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/load_reporting_registration_test

endif

$(OBJDIR)/$(CONFIG)/test/core/load_reporting/load_reporting_registration.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a

deps_load_reporting_registration_test: $(LOAD_REPORTING_REGISTRATION_TEST_OBJS:.o=.dep)

ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(LOAD_REPORTING_REGISTRATION_TEST_OBJS:.o=.dep)
endif
endif


LOW_LEVEL_PING_PONG_BENCHMARK_SRC = \
test/core/network_benchmarks/low_level_ping_pong.c \

Expand Down Expand Up @@ -14349,6 +14311,8 @@ ifneq ($(OPENSSL_DEP),)
# This is to ensure the embedded OpenSSL is built beforehand, properly
# installing headers to their final destination on the drive. We need this
# otherwise parallel compilation will fail if a source is compiled first.
src/core/ext/load_reporting/load_reporting.c: $(OPENSSL_DEP)
src/core/ext/load_reporting/load_reporting_filter.c: $(OPENSSL_DEP)
src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP)
src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP)
src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP)
Expand Down
4 changes: 2 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@
],
'sources': [
'src/core/lib/surface/init.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/lib/channel/channel_args.c',
'src/core/lib/channel/channel_stack.c',
'src/core/lib/channel/channel_stack_builder.c',
Expand Down Expand Up @@ -619,7 +618,6 @@
'src/core/lib/json/json_reader.c',
'src/core/lib/json/json_string.c',
'src/core/lib/json/json_writer.c',
'src/core/lib/load_reporting/load_reporting.c',
'src/core/lib/surface/alarm.c',
'src/core/lib/surface/api_trace.c',
'src/core/lib/surface/byte_buffer.c',
Expand Down Expand Up @@ -718,6 +716,8 @@
'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/native/dns_resolver.c',
'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/census/context.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
Expand Down
25 changes: 11 additions & 14 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ filegroups:
- include/grpc/grpc.h
- include/grpc/status.h
headers:
- src/core/ext/load_reporting/load_reporting_filter.h
- src/core/lib/channel/channel_args.h
- src/core/lib/channel/channel_stack.h
- src/core/lib/channel/channel_stack_builder.h
Expand Down Expand Up @@ -201,7 +200,6 @@ filegroups:
- src/core/lib/json/json_common.h
- src/core/lib/json/json_reader.h
- src/core/lib/json/json_writer.h
- src/core/lib/load_reporting/load_reporting.h
- src/core/lib/surface/api_trace.h
- src/core/lib/surface/call.h
- src/core/lib/surface/call_test_only.h
Expand All @@ -222,7 +220,6 @@ filegroups:
- src/core/lib/transport/transport.h
- src/core/lib/transport/transport_impl.h
src:
- src/core/ext/load_reporting/load_reporting_filter.c
- src/core/lib/channel/channel_args.c
- src/core/lib/channel/channel_stack.c
- src/core/lib/channel/channel_stack_builder.c
Expand Down Expand Up @@ -279,7 +276,6 @@ filegroups:
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- src/core/lib/load_reporting/load_reporting.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
Expand Down Expand Up @@ -385,6 +381,16 @@ filegroups:
uses:
- grpc_base
- grpc_client_config
- name: grpc_load_reporting
headers:
- src/core/ext/load_reporting/load_reporting.h
- src/core/ext/load_reporting/load_reporting_filter.h
src:
- src/core/ext/load_reporting/load_reporting.c
- src/core/ext/load_reporting/load_reporting_filter.c
plugin: grpc_load_reporting_plugin
uses:
- grpc_base
- name: grpc_resolver_dns_native
src:
- src/core/ext/resolver/dns/native/dns_resolver.c
Expand Down Expand Up @@ -740,6 +746,7 @@ libs:
- grpc_lb_policy_round_robin
- grpc_resolver_dns_native
- grpc_resolver_sockaddr
- grpc_load_reporting
- grpc_secure
- census
generate_plugin_registry: true
Expand Down Expand Up @@ -1919,16 +1926,6 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: load_reporting_registration_test
build: test
language: c
src:
- test/core/load_reporting/load_reporting_registration.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: low_level_ping_pong_benchmark
build: benchmark
language: c
Expand Down
5 changes: 2 additions & 3 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/support/tmpfile_win32.c \
src/core/lib/support/wrap_memcpy.c \
src/core/lib/surface/init.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/lib/channel/channel_args.c \
src/core/lib/channel/channel_stack.c \
src/core/lib/channel/channel_stack_builder.c \
Expand Down Expand Up @@ -138,7 +137,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/json/json_reader.c \
src/core/lib/json/json_string.c \
src/core/lib/json/json_writer.c \
src/core/lib/load_reporting/load_reporting.c \
src/core/lib/surface/alarm.c \
src/core/lib/surface/api_trace.c \
src/core/lib/surface/byte_buffer.c \
Expand Down Expand Up @@ -237,6 +235,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/lb_policy/round_robin/round_robin.c \
src/core/ext/resolver/dns/native/dns_resolver.c \
src/core/ext/resolver/sockaddr/sockaddr_resolver.c \
src/core/ext/load_reporting/load_reporting.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/ext/census/context.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
Expand Down Expand Up @@ -573,7 +573,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/http)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/json)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/load_reporting)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/profiling)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/support)
Expand Down
Loading

0 comments on commit b41363e

Please sign in to comment.