Uploaded image for project: 'Hot Rod Native client'
  1. Hot Rod Native client
  2. HRCPP-119

PingOnStartup behavior is different between the Java and C++ clients

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 6.0.2.Final
    • None
    • None

    Description

      I have been investigating why the RemoteCacheManagerTest fails when it is run with the C++ client. Specifically the testBooleanConstructor and testNoArgConstructor tests fail. These tests fail because the test case setup method starts a Hot Rod server on a random port, and the C++ client tries to connect on the default port. (11222) This makes sense, but this would suggest that these tests should fail with the Java Hot Rod client as well.

      However, the test does pass with the Java client, because the Java RemoteCacheManager constructors do not contact the server. The difference is with the pingOnStartup configuration. If this value is true in the C++ client, the server is pinged in the TcpTransport.start method which is called from the RemoteCacheManager.start method. If this value is true in the Java client, the server is pinged in the getCache() method. That also explains why the testBooleanConstructor and testNoArgConstructor tests do not attempt any operations against the cache. (They don't call the assertWorks method)

      Attachments

        Issue Links

          Activity

            People

              ttarrant@redhat.com Tristan Tarrant
              rhn-support-afield Alan Field
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: