Skip to content

Commit

Permalink
Merge branch 'backport-4100' into release-2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Coduz committed Oct 7, 2024
2 parents f49f00e + d197e02 commit e8c5165
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ public void startEventBus() throws Exception {
serviceModuleBundle.startup();
}

@Given("Service events are shutdown")
public void stopEventBus() throws Exception {
ServiceModuleBundle serviceModuleBundle = KapuaLocator.getInstance().getComponent(ServiceModuleBundle.class);
serviceModuleBundle.shutdown();
}

private void startBaseDockerEnvironmentInternal() throws Exception {
logger.info("Starting full docker environment...");
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Feature: Device Broker Integration
Given Init Jaxb Context
And Init Security Context
And Start full docker environment
#Now I set service events because the "Test the forced disconnection of a connected device" scenario send events and therefore needs connection to event-broker
And Service events are setup

Scenario: Send BIRTH message and then DC message
Effectively this is connect and disconnect of Kura device.
Expand Down Expand Up @@ -52,15 +54,12 @@ Feature: Device Broker Integration

Scenario: Test the forced disconnection of a connected device

Given Service events are setup
And Client with name "client-disc-1" with client id "client-disc-1" user "kapua-broker" password "kapua-password" is connected
Given Client with name "client-disc-1" with client id "client-disc-1" user "kapua-broker" password "kapua-password" is connected
Then Device status is "CONNECTED" within 5 seconds for client id "client-disc-1"
When I Force Disconnect connection with client id "client-disc-1"
Then Device status is "DISCONNECTED" within 10 seconds for client id "client-disc-1"
And Client named "client-disc-1" is not connected

#TODO
#disable for now. Wait for further investigation.
Scenario: Test the stealing link handling with 2 clients with same client id but different account (they should be able to connect both)
Given I login as user with name "kapua-sys" and password "kapua-password"
Given broker account "acme-1" with organization "acme-org-1" and email "[email protected]" and user "acme-1" are created
Expand All @@ -73,5 +72,6 @@ Feature: Device Broker Integration

@teardown
Scenario: Stop full docker environment
Given Stop full docker environment
Given Service events are shutdown
And Stop full docker environment
And Clean Locator Instance

0 comments on commit e8c5165

Please sign in to comment.