Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max attempts ignored when guard exists #145

Open
jsccast opened this issue Dec 1, 2021 · 1 comment
Open

Max attempts ignored when guard exists #145

jsccast opened this issue Dec 1, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jsccast
Copy link
Member

jsccast commented Dec 1, 2021

Example:

spec:
  phases:
    phase1:
      steps:
        - pub:
            chan: mother
            payload:
              make:
                name: shell
                type: cmd
                config:
                  command: bash
        - recv:
            chan: mother
            pattern:
              success: true
        - pub:
            payload: |
              echo '{"statuscode":200,"body":{"activities":1}}'
        - recv:
            chan: shell
            attempts: 1
            pattern:
              statuscode: 200
              body:
                activities: "?activities"
            guard: |
              return bindings["?activities"] >= 2;

This test should fail (without timing out). Instead it hangs. If the guard is removed (and the recv body is altered to prevent a match), the test fails immediately as it should.

@jsccast jsccast added the bug Something isn't working label Dec 1, 2021
@jsccast jsccast self-assigned this Dec 1, 2021
@jsccast
Copy link
Member Author

jsccast commented Dec 1, 2021

Shockingly #109 seems to fix this bug, but #109 is somewhat scary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant