|
|
@ -33,6 +33,7 @@ import abc |
|
|
|
import threading |
|
|
|
import threading |
|
|
|
|
|
|
|
|
|
|
|
from grpc._junkdrawer import math_pb2 |
|
|
|
from grpc._junkdrawer import math_pb2 |
|
|
|
|
|
|
|
from grpc.framework.common import test_constants |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ProtoScenario(object): |
|
|
|
class ProtoScenario(object): |
|
|
@ -219,10 +220,9 @@ class BidirectionallyUnaryScenario(ProtoScenario): |
|
|
|
class BidirectionallyStreamingScenario(ProtoScenario): |
|
|
|
class BidirectionallyStreamingScenario(ProtoScenario): |
|
|
|
"""A scenario that transmits no protocol buffers in either direction.""" |
|
|
|
"""A scenario that transmits no protocol buffers in either direction.""" |
|
|
|
|
|
|
|
|
|
|
|
_STREAM_LENGTH = 200 |
|
|
|
|
|
|
|
_REQUESTS = tuple( |
|
|
|
_REQUESTS = tuple( |
|
|
|
math_pb2.DivArgs(dividend=59 + index, divisor=7 + index) |
|
|
|
math_pb2.DivArgs(dividend=59 + index, divisor=7 + index) |
|
|
|
for index in range(_STREAM_LENGTH)) |
|
|
|
for index in range(test_constants.STREAM_LENGTH)) |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
self._lock = threading.Lock() |
|
|
|
self._lock = threading.Lock() |
|
|
|