mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
chore: fix memcached pipeline test (#3438)
This commit is contained in:
parent
8f7c36e4b3
commit
55d39b66ff
3 changed files with 8 additions and 9 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -172,7 +172,7 @@ jobs:
|
|||
dfly-executable: dragonfly
|
||||
run-only-on-ubuntu-latest: true
|
||||
build-folder-name: build
|
||||
filter: ${{ matrix.build-type == 'Release' && 'not slow' || '(not slow) and (not opt_only)' }}
|
||||
filter: ${{ matrix.build-type == 'Release' && '(not slow) and (not dbg_only)' || '(not slow) and (not opt_only)' }}
|
||||
|
||||
- name: Upload regression logs on failure
|
||||
if: failure()
|
||||
|
|
6
.github/workflows/regression-tests.yml
vendored
6
.github/workflows/regression-tests.yml
vendored
|
@ -42,11 +42,7 @@ jobs:
|
|||
dfly-executable: dragonfly
|
||||
gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }}
|
||||
build-folder-name: build
|
||||
# This expression serves as a ternary operator, i.e. if the condition holds it returns
|
||||
# 'not NON_EXISTING_MARK' otherwise not opt_only.
|
||||
# Do not filter anything in Release, but do not run opt_only in Debug. Unfortunately an
|
||||
# empty string creates a 'false' expression, so we use a non existing mark
|
||||
filter: ${{ matrix.build-type == 'Release' && 'not NON_EXISTING_MARK' || 'not opt_only' }}
|
||||
filter: ${{ matrix.build-type == 'Release' && 'not dbg_only' || 'not opt_only' }}
|
||||
|
||||
- name: Upload logs on failure
|
||||
if: failure()
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import pytest
|
||||
from pymemcache.client.base import Client as MCClient
|
||||
from . import dfly_args
|
||||
from redis import Redis
|
||||
from .instance import DflyInstance
|
||||
import socket
|
||||
import random
|
||||
|
||||
from . import dfly_args
|
||||
from .instance import DflyInstance
|
||||
|
||||
DEFAULT_ARGS = {"memcached_port": 11211, "proactor_threads": 4}
|
||||
|
||||
# Generic basic tests
|
||||
|
@ -45,6 +47,7 @@ def test_basic(memcached_client: MCClient):
|
|||
# Noreply (and pipeline) tests
|
||||
|
||||
|
||||
@pytest.mark.dbg_only
|
||||
@dfly_args(DEFAULT_ARGS)
|
||||
def test_noreply_pipeline(df_server: DflyInstance, memcached_client: MCClient):
|
||||
"""
|
||||
|
@ -64,7 +67,7 @@ def test_noreply_pipeline(df_server: DflyInstance, memcached_client: MCClient):
|
|||
assert memcached_client.get_many(keys) == {k: v.encode() for k, v in zip(keys, values)}
|
||||
|
||||
info = Redis(port=df_server.port).info()
|
||||
assert info["total_pipelined_commands"] > len(keys) - 5
|
||||
assert info["total_pipelined_commands"] > len(keys) / 3 # sometimes CI is slow
|
||||
|
||||
|
||||
@dfly_args(DEFAULT_ARGS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue