Skip to content

Commit

Permalink
Fix[IT]: CSL+FSM together or both disabled; rollback new python featu…
Browse files Browse the repository at this point in the history
…res (#592)

Signed-off-by: Evgeny Malygin <[email protected]>
  • Loading branch information
678098 authored Feb 4, 2025
1 parent 0e8bbf2 commit 7b30704
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 182 deletions.
1 change: 0 additions & 1 deletion src/integration-tests/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ markers =
single
multi
legacy_mode
csl_mode
fsm_mode
flakey
2 changes: 1 addition & 1 deletion src/integration-tests/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# =====
# ./run-tests
# ./run-tests "legacy_mode"
# ./run-tests "not csl_mode"
# ./run-tests "not fsm_mode"
# ./run-tests "legacy_mode or fsm_mode"
# export BLAZINGMQ_IT_PRESET="fsm_mode" && ./run-tests

Expand Down
5 changes: 2 additions & 3 deletions src/python/blazingmq/dev/it/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,8 @@ Tests can be selected using keywords (using the `-k` switch) and/or markers
| `pr_integrationtest` | integration tests to be run as part of a Jenkins PR (currently all tests) |
| `single` | tests that use a local cluster fixture |
| `multi` | tests that use a 4-node, 2-proxy cluster fixture |
| `legacy_mode` | choice between: legacy, CSL, FSM |
| `csl_mode` | choice between: legacy, CSL, FSM |
| `fsm_mode` | choice between: legacy, CSL, FSM |
| `legacy_mode` | choice between: legacy, FSM (with CSL) |
| `fsm_mode` | choice between: legacy, FSM (with CSL) |
| `flakey` | tests that occasionally fail; excluded from the Jenkins PR check |

### Erroneous Exits
Expand Down
9 changes: 4 additions & 5 deletions src/python/blazingmq/dev/it/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,22 +453,21 @@ def break_before_test(request, cluster):

class Mode(IntEnum):
LEGACY = 0
CSL = 1
FSM = 2
FSM = 1

def tweak(self, cluster: mqbcfg.ClusterDefinition):
cluster.cluster_attributes.is_cslmode_enabled = self >= Mode.CSL
# CSL and FSM settings must be either both enabled or both disabled
cluster.cluster_attributes.is_cslmode_enabled = self == Mode.FSM
cluster.cluster_attributes.is_fsmworkflow = self == Mode.FSM

@property
def suffix(self) -> str:
return ["", "_csl", "_fsm"][self]
return ["", "_fsm"][self]

@property
def marks(self):
return [
[pytest.mark.legacy_mode],
[pytest.mark.csl_mode],
[pytest.mark.fsm_mode],
][self]

Expand Down
6 changes: 3 additions & 3 deletions src/python/blazingmq/dev/it/process/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@


class CommandResult(NamedTuple):
error_code: int | None
matches: List[re.Match | None] | None
error_code: Optional[int]
matches: Optional[List[Optional[re.Match]]]


blocktimeout = 15
Expand Down Expand Up @@ -378,7 +378,7 @@ def list(self, uri=None, block=None) -> List[Message]:

def confirm(
self, uri, guid, block=None, succeed=None, no_except=None
) -> int | None:
) -> Optional[int]:
command = _build_command(f'confirm uri="{uri}" guid="{guid}"', {}, {})
with internal_use(self):
res = self._command_helper(
Expand Down
Loading

0 comments on commit 7b30704

Please sign in to comment.