- This demonstrates the power of Plummb. It also provides a way to play around with pre-configured rules.
- During UAT, certain actions can be Simulated, thus enabling proper testing.
- Class - SimulationTest
- Delay Action
- Introduce a delay in minutes before calling actual method.
- Throw Exception Action
- Throw a custom Exception before calling actual method.
- Delay Action
- Class - SimulationTest
- Certain actions can be introduced when an Exception is thrown.
- Class - ResilienceTest
- Retry Action
- At times retrying a method succeeds when making a call network call.
- Retry Action
- Class - CircuitBreakerTest
- Circuit Breaker Action
- Closed Circuit
- A call starts with a Closed Circuit
- Open Circuit
- When call failures cross an Open threshold, the circuit becomes Open. Means at this time, configured Exception is thrown without calling actual method.
- Half-Open Circuit
- When call failures cross a Half-Open threshold, the circuit becomes Half-Open. Means only few percentage of times actual call is made, while an Exception is thrown for the rest.
- Closed Circuit
- Circuit Breaker Action
- Class - ResilienceTest
- An exception message can be modified. Especially helpful when the original exception contains some sensitive information.
- Class - MorphingTest
- Morphing a sensitive Exception message
- Class - MorphingTest
- Logging the performance and depth of methods
- Class - ExpensiveServiceTest
- Method Logging
- Emit information if a method has taken at least X milliseconds.
- Pending Method Logging
- Emit information if a method has been pending for at least X milliseconds and still executing.
- Method Logging
- Class - ExpensiveServiceTest
- IP is NOT tracked for this account.
- Java 7+
- Maven 3.3.9 or above
- The project contains a bundled Plummb Jar file.
- Just clone the repository and execute mvn clean install
- Login to www.plummb.com
- Download appropriate Plummb tar from Help link
- Follow the process to install Plummb Jar
- Remove 2 lines from pom.xml, as marked
- TheContext is the object to play around. By default all are enabled.
- Set simulationEnabled flag to enable/disable Simulation Rules
- Set resilienceEnabled flag to enable/disable Resilience Rules
- Set circuitEnabled flag to enable/disable Circuit Breakers
- Set morphEnabled flag to enable/disable Morphing
- All settings can be viewed using Guest login
- Sign In/Up at www.plummb.com
- Disclaimer: Below images may be obsolete. Login as Guest for latest configurations.
- Update "Organization Info" as shown
- Click "Access Keys", an access key is already generated.
- Update accessKey in src/main/resources/plummbAgent.properties
- Execute mvn clean install.
- This will fail presently.
- This execution will help in filling the Drop Down for configuring Rules
- Create "Simulation Rule" as below
- Create "Resilience Rule" as below
- Execute again mvn clean install
- This time the test cases should succeed
- Repo owner : support@plummb.com