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

SocketTimeoutErrorTest.testErrorWhileDoingPut does not throw a java.net.SocketTimeoutException

    XMLWordPrintable

Details

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

    Description

      The test case now correctly throws a HotRodClientException with the message "org.infinispan.client.hotrod.exceptions.InvalidResponseException:: Invalid message id. Expected 3 and received 2". From looking at the test case code [1] the InvalidResponseException exception is caught on line 83 and it the cause is null, so the assert on line 85 fails. The question is whether this is correct exception for the C++ client to throw in this situation. The socket timeout is set to 3 seconds, and then a put is done that triggers a 60 second pause before the put is performed. I don't see any SocketTimeoutException defined in the C++ code, so that exception will not be thrown. This test case should probably be removed from JniTest, because it will never set the cause of the HotRodClientException to a java.net.SocketTimeoutException.

      [1] https://github.com/infinispan/infinispan/blob/master/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/SocketTimeoutErrorTest.java

      8: FAILED: testErrorWhileDoingPut(public void org.infinispan.client.hotrod.SocketTimeoutErrorTest.testErrorWhileDoingPut(java.lang.reflect.Method) throws java.lang.Exception)
      8: java.lang.AssertionError
      8: 	at org.infinispan.client.hotrod.SocketTimeoutErrorTest.testErrorWhileDoingPut(SocketTimeoutErrorTest.java:85)
      8: 	at org.infinispan.client.jni.hotrod.JniTest.main(JniTest.java:56)
      8: ... Removed 21 stack frames
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: