Skip to content

Commit

Permalink
ELY-2638 : Simplify test assertions in SSLAuthenticationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Nidhi authored and PrarthonaPaul committed Oct 16, 2023
1 parent fd18d21 commit eb986b3
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -17,12 +17,12 @@
*/
package org.wildfly.security.ssl;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertNotEquals;
import static org.wildfly.security.ssl.test.util.CAGenerationTool.SIGNATURE_ALGORTHM;
import static org.wildfly.security.x500.X500.OID_AD_OCSP;
import static org.wildfly.security.x500.X500.OID_KP_OCSP_SIGNING;
Expand Down Expand Up @@ -863,10 +863,10 @@ private void testCommunication(SSLContext serverContext, SSLContext clientContex
}

if (oneWay) {
assertFalse(clientSocket.getSession().getProtocol().equals("TLSv1.3")); // since TLS 1.3 is not enabled by default (ELY-1917)
assertNotEquals("TLSv1.3", clientSocket.getSession().getProtocol());// since TLS 1.3 is not enabled by default (ELY-1917)
} else {
assertFalse(serverSocket.getSession().getProtocol().equals("TLSv1.3")); // since TLS 1.3 is not enabled by default
assertFalse(clientSocket.getSession().getProtocol().equals("TLSv1.3")); // since TLS 1.3 is not enabled by default
assertNotEquals("TLSv1.3", serverSocket.getSession().getProtocol()); // since TLS 1.3 is not enabled by default
assertNotEquals("TLSv1.3", clientSocket.getSession().getProtocol()); // since TLS 1.3 is not enabled by default
}
return received;
} catch (Exception e) {
Expand Down

0 comments on commit eb986b3

Please sign in to comment.