This API was developed to test an application runtime platform's ability to restart crashed applications.
Returns a message confirming the API is running.
This will request the API to immediately shutdown without waiting for other processes to complete. It returns "OK" to the caller first.
Simulates a long running process that will run for the given number of seconds.
e.g. /doSomething/15
will take 15 seconds to return to the caller.
I have provided a simple Postman collection with requests for each endpoint locally and on the public test environment. Available here. See importing postman data for help using this collection.
This is a standard Spring Boot application and can be most simply run with the following command:
./gradlew bootRun
This API is publicly hosted on the PCF platform at https://crashable-api.cfapps.io which can be used for testing. If you send the signal for this application to crash, PCF will automatically detect the crashed app and restart it. This usually takes up to 10 seconds.
If this is interesting or valuable to you, feel free to clone/fork the repo for your own use and/or give feedback in GitHub issues. Pull requests are welcome.