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

Credo Mediator fails to shutdown when mediating other Credo agents with no inbound transports set #2042

Open
nodlesh opened this issue Sep 20, 2024 · 0 comments

Comments

@nodlesh
Copy link

nodlesh commented Sep 20, 2024

I have a test where all agents are credo agents. All agents restart with the configuration illustrated below in the test, and the test completes successfully. Bob at the end of the test is the mediator for Acme and Faber. Acme and Faber were restarted without inbound transports set. Any subsequent restarts of Bob fails, it will just hang on agent.shutdown() though Bob will still seem to process inbound and outbound messages; Messages like this,

[2024-09-20T19:02:01.157] [DEBUG] [TSED] - Found session with return routing for message 'a46750b5-42e9-45e8-9382-147b1c34edea' (connection 'a4c06271-7d4d-4d83-8907-73b9d9d40524'
[2024-09-20T19:02:01.157] [DEBUG] [TSED] - Packing message and sending it via existing session WebSocket...
[2024-09-20T19:02:01.158] [DEBUG] [TSED] - Pack outbound message https://didcomm.org/messagepickup/2.0/status
[2024-09-20T19:02:01.162] [DEBUG] [TSED] - Sending message
[2024-09-20T19:02:01.162] [DEBUG] [TSED] - Processed inbound message: {"@type":"https://didcomm.org/messagepickup/2.0/status-request","@id":"500b28ac-eaec-4658-a559-5ca6c8548924","~transport":{"return_route":"all"}}
[2024-09-20T19:02:01.162] [DEBUG] [TSED] - WebSocket sent message successfully.

This is the test specification:

  @T004-RFC0211 @UsesCustomParameters @RFC0025 @Transport_Http @Transport_Ws @normal @AcceptanceTest
  Scenario Outline: Two agents creating a connection using a mediator without having inbound transports
    Given we have "2" agents
      | name  | role      |
      | Acme  | recipient |
      | Bob   | mediator  |
      | Faber | sender    |
    And "Acme" is running with parameters "{"inbound_transports": <acme-inbound-transports>, "outbound_transports": <acme-outbound-transports> }"
    And "Bob" is running with parameters "{"inbound_transports": <bob-inbound-transports>, "outbound_transports": <bob-outbound-transports> }"
    And "Faber" is running with parameters "{"inbound_transports": <faber-inbound-transports>, "outbound_transports": <faber-outbound-transports> }"

    # Create connection, request mediation
    When "Bob" and "Acme" create a new connection
    And "Acme" requests mediation from "Bob"
    And "Bob" grants the mediation request from "Acme"
    Then "Acme" has "Bob" set up as a mediator

    When "Bob" and "Faber" create a new connection
    And "Faber" requests mediation from "Bob"
    And "Bob" grants the mediation request from "Faber"
    Then "Faber" has "Bob" set up as a mediator

    # Create connection through the mediator
    When "Acme" uses "Bob" as a mediator
    And "Faber" uses "Bob" as a mediator
    And "Faber" and "Acme" create a new connection

    @RFC0160
    Examples: Acme and Faber creating a 0160 connection using Bob as a mediator without having inbound transports
      | acme-inbound-transports | acme-outbound-transports | bob-inbound-transports | bob-outbound-transports | faber-inbound-transports | faber-outbound-transports |
      | []                      | ["ws", "http"]           | ["ws", "http"]         | ["ws", "http"]          | []                       | ["ws", "http"]            |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant