Skip to content
Snippets Groups Projects
Commit cd114a74 authored by Masood Malekghassemi's avatar Masood Malekghassemi
Browse files

Merge pull request #2677 from nathanielmanistaatgoogle/test-constants

Add STREAM_LENGTH and POOL_SIZE to test_constants
parents 2aff2b44 7b042c57
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ import abc
import threading
from grpc._junkdrawer import math_pb2
from grpc.framework.common import test_constants
class ProtoScenario(object):
......@@ -219,10 +220,9 @@ class BidirectionallyUnaryScenario(ProtoScenario):
class BidirectionallyStreamingScenario(ProtoScenario):
"""A scenario that transmits no protocol buffers in either direction."""
_STREAM_LENGTH = 200
_REQUESTS = tuple(
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):
self._lock = threading.Lock()
......
......@@ -35,3 +35,9 @@ SHORT_TIMEOUT = 4
# Absurdly large value for maximum duration in seconds for should-not-time-out
# RPCs made during tests.
LONG_TIMEOUT = 3000
# The number of payloads to transmit in streaming tests.
STREAM_LENGTH = 200
# The size of thread pools to use in tests.
POOL_SIZE = 10
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment