Fixed error

pull/22292/head
Ashitha Santhosh 5 years ago
parent b1652b4443
commit 53fc4e5c13
  1. 8
      test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc
  2. 9
      test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc

@ -197,8 +197,8 @@ static grpc_call_error check_client_start_success(grpc_call* /*call*/,
GPR_ASSERT(upb_strview_eql(
grpc_gcp_StartClientHandshakeReq_target_name(client_start),
upb_strview_makez(ALTS_HANDSHAKER_CLIENT_TEST_TARGET_NAME)));
GPR_ASSERT(grpc_gcp_StartClientHandshakeReq_max_frame_size(
client_start, ALTS_HANDSHAKER_CLIENT_TEST_MAX_FRAME_SIZE));
GPR_ASSERT(grpc_gcp_StartClientHandshakeReq_max_frame_size(client_start) ==
ALTS_HANDSHAKER_CLIENT_TEST_MAX_FRAME_SIZE);
GPR_ASSERT(validate_op(client, op, nops, true /* is_start */));
return GRPC_CALL_OK;
}
@ -247,8 +247,8 @@ static grpc_call_error check_server_start_success(grpc_call* /*call*/,
upb_strview_makez(ALTS_RECORD_PROTOCOL)));
validate_rpc_protocol_versions(
grpc_gcp_StartServerHandshakeReq_rpc_versions(server_start));
GPR_ASSERT(grpc_gcp_StartServerHandshakeReq_max_frame_size(
server_start, ALTS_HANDSHAKER_CLIENT_TEST_MAX_FRAME_SIZE));
GPR_ASSERT(grpc_gcp_StartServerHandshakeReq_max_frame_size(server_start) ==
ALTS_HANDSHAKER_CLIENT_TEST_MAX_FRAME_SIZE);
GPR_ASSERT(validate_op(client, op, nops, true /* is_start */));
return GRPC_CALL_OK;
}

@ -27,6 +27,7 @@
#include "src/core/tsi/alts/handshaker/alts_shared_resource.h"
#include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h"
#include "src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h"
#include "src/core/tsi/transport_security_grpc.h"
#include "src/proto/grpc/gcp/altscontext.upb.h"
#include "test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.h"
#include "test/core/util/test_config.h"
@ -291,13 +292,13 @@ static void on_client_next_success_cb(tsi_result status, void* user_data,
// Validate max frame size value after Frame Size Negotiation. Here peer max
// frame size is greater than default value, and user specified max frame size
// is absent.
tsi_zero_copy_grpc_protector* zero_copy_protector;
tsi_zero_copy_grpc_protector* zero_copy_protector = nullptr;
GPR_ASSERT(tsi_handshaker_result_create_zero_copy_frame_protector(
result, nullptr, &zero_copy_protector) == TSI_OK);
size_t actual_max_frame_size;
tsi_zero_copy_grpc_protector_max_frame_size(zero_copy_protector,
&actual_max_frame_size);
GPR_ASSERT(actual_max_frame_size,
GPR_ASSERT(actual_max_frame_size ==
ALTS_TSI_HANDSHAKER_TEST_DEFAULT_MAX_FRAME_SIZE);
/* Validate peer identity. */
tsi_peer peer;
@ -362,7 +363,7 @@ static void on_server_next_success_cb(tsi_result status, void* user_data,
// Validate max frame size value after Frame Size Negotiation. The negotiated
// frame size value equals minimum send frame size, due to the absence of peer
// max frame size.
tsi_zero_copy_grpc_protector* zero_copy_protector;
tsi_zero_copy_grpc_protector* zero_copy_protector = nullptr;
size_t user_specified_max_frame_size =
ALTS_TSI_HANDSHAKER_TEST_MAX_FRAME_SIZE;
GPR_ASSERT(tsi_handshaker_result_create_zero_copy_frame_protector(
@ -371,7 +372,7 @@ static void on_server_next_success_cb(tsi_result status, void* user_data,
size_t actual_max_frame_size;
tsi_zero_copy_grpc_protector_max_frame_size(zero_copy_protector,
&actual_max_frame_size);
GPR_ASSERT(actual_max_frame_size, ALTS_TSI_HANDSHAKER_TEST_MIN_FRAME_SIZE);
GPR_ASSERT(actual_max_frame_size == ALTS_TSI_HANDSHAKER_TEST_MIN_FRAME_SIZE);
/* Validate peer identity. */
tsi_peer peer;
GPR_ASSERT(tsi_handshaker_result_extract_peer(result, &peer) == TSI_OK);

Loading…
Cancel
Save