Skip to content

Commit

Permalink
Remove old style remoting
Browse files Browse the repository at this point in the history
  • Loading branch information
nickebbutt committed Apr 20, 2018
1 parent 0dd772a commit 52f659d
Show file tree
Hide file tree
Showing 30 changed files with 61 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Chorus Context with JMX

Scenario: Values added to a local Context are propagated to a remote process
Given I start a calculator process named calcA which exports a Calculator handler
And I connect to the remote process calc
And I connect to the calc process
When I have entered 70 in calc
And I have entered 50 in calc
# this call to the remote calc process will put the result in the context
Expand All @@ -18,7 +18,7 @@ Feature: Chorus Context with JMX

Scenario: Values added in a remote context are available locally
Given I start a calculator process named calcB which exports a Calculator handler
And I connect to the remote process calc
And I connect to the calc process
# creates variables in the local context
When I create a context variable a with value 5
And I create a context variable b with value 20
Expand All @@ -29,7 +29,7 @@ Feature: Chorus Context with JMX

Scenario: Performing multiple calculations does not corrupt the context
Given I start a calculator process named calcC which exports a Calculator handler
And I connect to the remote process calc
And I connect to the calc process
When I have entered 70 in calc
And I have entered 50 in calc
And I press subtract in calc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Processes with JMX

Scenario: Start and interact with a single Java process using JMX
Given I can start a calculator process named calc which exports an Addition handler
And I connect to the remote process calc
And I connect to the calc process
When I have entered 50 in calc
And I have entered 70 in calc
And I press add in calc
Expand All @@ -23,7 +23,7 @@ Feature: Processes with JMX
Scenario: Start and interact with two Java processes using JMX
Given I can start a calculatorA process named calcA which exports an Addition handler
And I can start a calculatorB process named calcB which exports an Addition handler
And I connect to the remote processes calcA, calcB
And I connect to the processes calcA, calcB
# work with one process
When I have entered 10 in calcA
And I have entered 30 in calcA
Expand All @@ -39,7 +39,7 @@ Feature: Processes with JMX
Scenario: Interact with two different handlers within the same process
# this process exports an Addition handler and an echoing handler
Given I can start a calc2handlers process
And I connect to the remote process calc2handlers
And I connect to the calc2handlers process
# call a method on the Calculator handler
And I have entered 10 in calc2handlers
# call a method on the Echo handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import org.chorusbdd.chorus.remoting.jmx.ChorusHandlerJmxExporter;

import java.util.function.Function;
import java.util.function.UnaryOperator;
import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Feature: Remoting With Directives


Scenario: Connect using step not directive
When I connect to the remote process NoComponentName #! Processes start NoComponentName
When I connect to the NoComponentName process #! Processes start NoComponentName
Check I can call a step method exported by the handler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Chorus --> INFO - About to run process: <system specific process details rep
Chorus --> INFO - Processing scenario: Connect using step not directive
Chorus --> INFO - About to run process: <system specific process details replaced>
#! Processes start NoComponentName PASSED
When I connect to the remote process NoComponentName PASSED
When I connect to the NoComponentName process PASSED
Check I can call a step method exported by the handler PASSED


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Dynamic Configuration
Given I add a process config on port 23456 called hagrid
And I add a remoting config on port 23456 called harryPotter
And I start a hagrid process
And I connect to the process named hagrid
And I connect to the hagrid process
Then I can call an exported method


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Chorus --> INFO - Processing scenario: Configure remoting dynamically
And I add a remoting config on port 23456 called harryPotter PASSED
Chorus --> INFO - About to run process: <system specific process details replaced>
And I start a hagrid process PASSED
And I connect to the process named hagrid PASSED
And I connect to the hagrid process PASSED
Then I can call an exported method PASSED dumbledore


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Feature Start Scoping
When I run feature start
And I start a notScopedProcess process named myNotScoped
And I start a scopedProcess process named myScopedToScenario
And I connect to the remote processes myNotScoped, myScopedToScenario
And I connect to the processes myNotScoped, myScopedToScenario

Scenario: Scenario One
Then the process named myNotScoped is running
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Chorus --> INFO - About to run process: <system specific process details rep
And I start a notScopedProcess process named myNotScoped PASSED
Chorus --> INFO - About to run process: <system specific process details replaced>
And I start a scopedProcess process named myScopedToScenario PASSED
And I connect to the remote processes myNotScoped, myScopedToScenario PASSED
And I connect to the processes myNotScoped, myScopedToScenario PASSED
Scenario: Scenario One
Chorus --> INFO - Processing scenario: Scenario One
Then the process named myNotScoped is running PASSED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Default Handler Properties

Scenario: Start a Single Java Process
I can start a config1 process
And connect to the process named config1
And connect to the config1 process
And call a remote method
And stop process config1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Chorus --> INFO - No default handler found for Feature: (Default Handler Prop
Chorus --> INFO - Processing scenario: Start a Single Java Process
Chorus --> INFO - About to run process: <system specific process details replaced>
I can start a config1 process PASSED
And connect to the process named config1 PASSED
And connect to the config1 process PASSED
And call a remote method PASSED true
And stop process config1 PASSED

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Invalid Handler Config
And I wait for config1 to terminate

Scenario: Invalid config1 Remoting Properties
Given I can connect to the process named config1
Given I can connect to the config1 process
And I can call an exported method


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Chorus --> WARN - Invalid config config1 - main class was null or empty
Scenario: Invalid config1 Remoting Properties
Chorus --> INFO - Processing scenario: Invalid config1 Remoting Properties
Chorus --> WARN - Invalid config config1 - host was not set
Given I can connect to the process named config1 FAILED Remoting config must be valid for config1 (JmxRemotingManager:linenumber)-ChorusAssertionError
Given I can connect to the config1 process FAILED Remoting config must be valid for config1 (JmxRemotingManager:linenumber)-ChorusAssertionError
And I can call an exported method SKIPPED


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Invalid Properties

Scenario: Start a Single Java Process
Given I start a config1 process
And I connect to the process named config1
And I connect to the config1 process
Then I can call a remote method
#will fail no handler exported we should see the invalid remoting property logged anyway

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Chorus --> INFO - About to run process: <system specific process details rep
Given I start a config1 process PASSED
Chorus --> WARN - Ignoring property myinvalidprop which is not a supported Remoting handler property
Chorus --> WARN - Invalid config config1 - host was not set
And I connect to the process named config1 FAILED Remoting config must be valid for config1 (JmxRemotingManager:linenumber)-ChorusAssertionError
And I connect to the config1 process FAILED Remoting config must be valid for config1 (JmxRemotingManager:linenumber)-ChorusAssertionError
Then I can call a remote method SKIPPED


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ Feature: Polled Assertion

Scenario: Remoting with Polled Assertions
Given I start a remotePolled process
And I connect to the process named remotePolled
And I connect to the remotePolled process
When I start a timer
Then test condition eventually passes
And another test condition fails with AssertionError

Scenario: Remoting with Polled Assertions with Exception
Given I start a remotePolled process
And I connect to the process named remotePolled
And I connect to the remotePolled process
Then another test condition fails with Exception

Scenario: Remoting with Polled Assertions with RuntimeException
Given I start a remotePolled process
And I connect to the process named remotePolled
And I connect to the remotePolled process
Then another test condition fails with RuntimeException


Expand All @@ -59,5 +59,5 @@ Feature: Polled Assertion

Scenario: I can immediately break out of a remote passes within by throwing FailImmediatelyException
Given I start a remotePolled process
And I connect to the process named remotePolled
And I connect to the remotePolled process
When call a passes within step method remotely it can be terminated immediately by FailImmediatelyException
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ Chorus --> INFO - Processing scenario: Passes For Invoker Is Working
Chorus --> INFO - Processing scenario: Remoting with Polled Assertions
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a remotePolled process PASSED
And I connect to the process named remotePolled PASSED
And I connect to the remotePolled process PASSED
When I start a timer PASSED
Then test condition eventually passes PASSED
And another test condition fails with AssertionError FAILED remote ChorusAssertionError - Failed condition (RemoteProcessWithPolledAssertion$MyHandler:linenumber)-JmxRemotingException
Scenario: Remoting with Polled Assertions with Exception
Chorus --> INFO - Processing scenario: Remoting with Polled Assertions with Exception
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a remotePolled process PASSED
And I connect to the process named remotePolled PASSED
And I connect to the remotePolled process PASSED
Then another test condition fails with Exception FAILED remote Exception - My Exception Message (RemoteProcessWithPolledAssertion$MyHandler:linenumber)-JmxRemotingException
Scenario: Remoting with Polled Assertions with RuntimeException
Chorus --> INFO - Processing scenario: Remoting with Polled Assertions with RuntimeException
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a remotePolled process PASSED
And I connect to the process named remotePolled PASSED
And I connect to the remotePolled process PASSED
Then another test condition fails with RuntimeException FAILED remote RuntimeException - My Runtime Exception Message (RemoteProcessWithPolledAssertion$MyHandler:linenumber)-JmxRemotingException
Scenario: Long running step method overruns passes within period
Chorus --> INFO - Processing scenario: Long running step method overruns passes within period
Expand All @@ -51,7 +51,7 @@ Chorus --> INFO - Processing scenario: I can immediately break out of a passe
Chorus --> INFO - Processing scenario: I can immediately break out of a remote passes within by throwing FailImmediatelyException
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a remotePolled process PASSED
And I connect to the process named remotePolled PASSED
And I connect to the remotePolled process PASSED
When call a passes within step method remotely it can be terminated immediately by FailImmediatelyException FAILED remote FailImmediatelyException - Fail this step immediately - time elapsed 0 seconds (RemoteProcessWithPolledAssertion$MyHandler:linenumber)-JmxRemotingException


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Feature: Jmx Dual Handler Export

Scenario: Call An Exported Method
Given I start a config1 process named DualHandlerExport
And I connect to the process named DualHandlerExport
And I connect to the DualHandlerExport process
Then I can call a step method exported by the handler
And I can stop process DualHandlerExport

Scenario: Call A Conflicting Method
Given I start a config1 process named DualHandlerExport
And I connect to the process named DualHandlerExport
And I connect to the DualHandlerExport process
And I call a step method exported by handler one
And I call a step method exported by handler two
And I call a step method exported by both handlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Chorus --> INFO - No default handler found for Feature: (Jmx Dual Handler Exp
Chorus --> INFO - Processing scenario: Call An Exported Method
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a config1 process named DualHandlerExport PASSED
And I connect to the process named DualHandlerExport PASSED
And I connect to the DualHandlerExport process PASSED
Then I can call a step method exported by the handler PASSED
And I can stop process DualHandlerExport PASSED
Scenario: Call A Conflicting Method
Chorus --> INFO - Processing scenario: Call A Conflicting Method
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a config1 process named DualHandlerExport PASSED
And I connect to the process named DualHandlerExport PASSED
And I connect to the DualHandlerExport process PASSED
And I call a step method exported by handler one PASSED One
And I call a step method exported by handler two PASSED two
And I call a step method exported by both handlers FAILED Ambiguous step [I call a step method exported by both handlers], more than one implementation (RemoteComponent:DualHandlerExport:JmxDualHandlerExportHandler:canCallAStepMethodExportedByBoth / RemoteComponent:DualHandlerExport:JmxDualHandlerExportHandlerTwo:canCallAStepMethodExportedByBoth) (StepMatcher:linenumber)-DuplicateStepMatchException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Jmx With Configurations

Scenario: Config Properties Override Main Properties For Jmx Remoting
Given I start a config1 process named SingleHandlerExport
And I connect to the process named SingleHandlerExport
And I connect to the SingleHandlerExport process
Then I can call a step method exported by the handler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Chorus --> INFO - Processing scenario: Config Properties Override Main Proper
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a config1 process named SingleHandlerExport PASSED
Chorus --> ERROR - Failed to connect to mBean server on (localhost:18800)
And I connect to the process named SingleHandlerExport FAILED Failed to connect to mBean server on (localhost:18800) caused by: [replaced] (AbstractJmxProxy:linenumber)-ChorusException
And I connect to the SingleHandlerExport process FAILED Failed to connect to mBean server on (localhost:18800) caused by: [replaced] (AbstractJmxProxy:linenumber)-ChorusException
Then I can call a step method exported by the handler SKIPPED

Feature: Jmx With Configurations [config2]
Expand All @@ -16,7 +16,7 @@ Chorus --> INFO - No default handler found for Feature: (Jmx With Configurati
Chorus --> INFO - Processing scenario: Config Properties Override Main Properties For Jmx Remoting
Chorus --> INFO - About to run process: <system specific process details replaced>
Given I start a config1 process named SingleHandlerExport PASSED
And I connect to the process named SingleHandlerExport PASSED
And I connect to the SingleHandlerExport process PASSED
Then I can call a step method exported by the handler PASSED


Expand Down
Loading

0 comments on commit 52f659d

Please sign in to comment.