Class ConnectionManagementTest


  • public class ConnectionManagementTest
    extends Object
    Integration test used to demonstrate connection management issues with the FcrepoClient.
    Author:
    esm
    • Field Detail

      • mockServerRule

        public org.mockserver.junit.MockServerRule mockServerRule
        Starts a mock HTTP server on a free port
    • Method Detail

      • setUp

        public void setUp()
      • connectionReleasedOnException

        public void connectionReleasedOnException()
        Demonstrates that HTTP connections are released when the FcrepoClient throws an exception. Each method of the FcrepoClient (get, put, post, etc.) is tested.
      • connectionReleasedOnEntityBodyClose

        public void connectionReleasedOnEntityBodyClose()
        Demonstrates that HTTP connections are released when the user of the FcrepoClient closes the HTTP entity body. Each method of the FcrepoClient (get, put, post, etc.) is tested.
      • connectionReleasedOnEntityBodyRead

        public void connectionReleasedOnEntityBodyRead()
        Demonstrates that are connections are released when the user of the FcrepoClient reads the HTTP entity body.
      • connectionNotReleasedWhenEntityBodyIgnored

        public void connectionNotReleasedWhenEntityBodyIgnored()
        Demonstrates that are connections are NOT released if the user of the FcrepoClient does not handle the response body at all.
      • connectionReleasedOnEmptyBody

        public void connectionReleasedOnEmptyBody()
        Demonstrates that are connections are released when the FcrepoClient receives an empty response body.