Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ pytest
pytest-timeout
pytest-faulthandler
pytest-cov
futures; python_version < '3'
11 changes: 11 additions & 0 deletions tests/test_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from concurrent.futures import ThreadPoolExecutor
import time
import threading
import sys
Expand All @@ -34,6 +35,16 @@ def test_producer_send_sync(producer):
assert ret.status == SendStatus.OK


def test_producer_send_sync_multi_thread(producer):
executor = ThreadPoolExecutor(max_workers=5)
futures = []
for _ in range(5):
futures.append(executor.submit(test_producer_send_sync, producer))

for future in futures:
_ret = future.result()


def test_producer_send_oneway(producer):
msg = Message('test')
msg.set_keys('send_oneway')
Expand Down