Add test feature flags

pull/10090/head
Robbie Shade 8 years ago
parent 9e8783450f
commit 1f8342933f
  1. 7
      test/core/end2end/end2end_tests.h
  2. 4
      test/core/end2end/tests/network_status_change.c
  3. 4
      test/core/end2end/tests/resource_quota_server.c

@ -39,12 +39,15 @@
typedef struct grpc_end2end_test_fixture grpc_end2end_test_fixture;
typedef struct grpc_end2end_test_config grpc_end2end_test_config;
/* Test feature flags. */
#define FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION 1
#define FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION 2
#define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS 4
#define FEATURE_MASK_SUPPORTS_REQUEST_PROXYING 8
#define FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL 16
#define FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER 32
#define FEATURE_MASK_DOES_NOT_SUPPORT_RESOURCE_QUOTA_SERVER 64
#define FEATURE_MASK_DOES_NOT_SUPPORT_NETWORK_STATUS_CHANGE 128
#define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check"
@ -56,8 +59,12 @@ struct grpc_end2end_test_fixture {
};
struct grpc_end2end_test_config {
/* A descriptive name for this test fixture. */
const char *name;
/* Which features are supported by this fixture. See feature flags above. */
uint32_t feature_mask;
grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args *client_args,
grpc_channel_args *server_args);
void (*init_client)(grpc_end2end_test_fixture *f,

@ -240,6 +240,10 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
}
void network_status_change(grpc_end2end_test_config config) {
if (config.feature_mask &
FEATURE_MASK_DOES_NOT_SUPPORT_NETWORK_STATUS_CHANGE) {
return;
}
test_invoke_network_status_change(config);
}

@ -113,6 +113,10 @@ static grpc_slice generate_random_slice() {
}
void resource_quota_server(grpc_end2end_test_config config) {
if (config.feature_mask &
FEATURE_MASK_DOES_NOT_SUPPORT_RESOURCE_QUOTA_SERVER) {
return;
}
grpc_resource_quota *resource_quota =
grpc_resource_quota_create("test_server");
grpc_resource_quota_resize(resource_quota, 5 * 1024 * 1024);

Loading…
Cancel
Save