File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
packages/google-cloud-ndb Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,14 @@ def __init__(
147147 )
148148
149149 if emulator :
150- channel = grpc .insecure_channel (self .host )
150+ channel = grpc .insecure_channel (
151+ self .host ,
152+ options = [
153+ # Default options provided in DatastoreGrpcTransport, but not when we override the channel.
154+ ("grpc.max_send_message_length" , - 1 ),
155+ ("grpc.max_receive_message_length" , - 1 ),
156+ ],
157+ )
151158 else :
152159 user_agent = self .client_info .to_user_agent ()
153160 channel = _helpers .make_secure_channel (
Original file line number Diff line number Diff line change @@ -401,6 +401,24 @@ def insert(foo):
401401 thread2 .join ()
402402
403403
404+ @pytest .mark .usefixtures ("client_context" )
405+ def test_large_rpc_lookup (dispose_of , ds_client ):
406+ class SomeKind (ndb .Model ):
407+ foo = ndb .TextProperty ()
408+
409+ foo = "a" * (500 * 1024 )
410+
411+ keys = []
412+ for i in range (15 ):
413+ key = SomeKind (foo = foo ).put ()
414+ dispose_of (key ._key )
415+ keys .append (key )
416+
417+ retrieved = ndb .get_multi (keys )
418+ for entity in retrieved :
419+ assert entity .foo == foo
420+
421+
404422@pytest .mark .usefixtures ("client_context" )
405423def test_large_json_property (dispose_of , ds_client ):
406424 class SomeKind (ndb .Model ):
You can’t perform that action at this time.
0 commit comments