This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch SUREFIRE-1796
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/SUREFIRE-1796 by this push:
new 5df88c8 changes after Michael's review
5df88c8 is described below
commit 5df88c87bc619f6910987acb6a17f964ae90538b
Author: tibordigana <[email protected]>
AuthorDate: Wed Jun 10 13:54:35 2020 +0200
changes after Michael's review
---
...{AuthenticationException.java => InvalidSessionIdException.java} | 6 +++---
.../maven/plugin/surefire/extensions/SurefireForkChannel.java | 2 +-
.../java/org/apache/maven/plugin/surefire/extensions/E2ETest.java | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/AuthenticationException.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/InvalidSessionIdException.java
similarity index 86%
rename from
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/AuthenticationException.java
rename to
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/InvalidSessionIdException.java
index b7fd5c7..2ceaf12 100644
---
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/AuthenticationException.java
+++
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/InvalidSessionIdException.java
@@ -25,14 +25,14 @@ import
org.apache.maven.surefire.extensions.util.CommandlineExecutor;
import java.io.IOException;
/**
- * After the authentication has failed, {@link ForkChannel#connectToClient()}
throws {@link AuthenticationException}
+ * After the authentication has failed, {@link ForkChannel#connectToClient()}
throws {@link InvalidSessionIdException}
* and {@link org.apache.maven.plugin.surefire.booterclient.ForkStarter}
should close {@link CommandlineExecutor}.
*
* @since 3.0.0-M5
*/
-public class AuthenticationException extends IOException
+public class InvalidSessionIdException extends IOException
{
- public AuthenticationException( String actualSessionId, String
expectedSessionId )
+ public InvalidSessionIdException( String actualSessionId, String
expectedSessionId )
{
super( "The actual sessionId '" + actualSessionId + "' does not match
'" + expectedSessionId + "'." );
}
diff --git
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
index 092c5f9..5049dcf 100644
---
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
+++
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
@@ -133,7 +133,7 @@ final class SurefireForkChannel extends ForkChannel
String clientSessionId = new String( buffer.array(), US_ASCII );
if ( !clientSessionId.equals( sessionId ) )
{
- throw new AuthenticationException( clientSessionId, sessionId );
+ throw new InvalidSessionIdException( clientSessionId, sessionId );
}
}
diff --git
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/E2ETest.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/E2ETest.java
index 8bdce47..34946ef 100644
---
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/E2ETest.java
+++
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/E2ETest.java
@@ -197,7 +197,7 @@ public class E2ETest
}
@Test( timeout = 10_000L )
- public void shouldAuthenticateClient() throws Exception
+ public void shouldVerifyClient() throws Exception
{
ForkNodeArguments forkNodeArguments = mock( ForkNodeArguments.class );
when( forkNodeArguments.getSessionId() ).thenReturn(
UUID.randomUUID().toString() );
@@ -227,7 +227,7 @@ public class E2ETest
}
@Test( timeout = 10_000L )
- public void shouldNotAuthenticateClient() throws Exception
+ public void shouldNotVerifyClient() throws Exception
{
ForkNodeArguments forkNodeArguments = mock( ForkNodeArguments.class );
String serverSessionId = UUID.randomUUID().toString();
@@ -252,7 +252,7 @@ public class E2ETest
t.setDaemon( true );
t.start();
- e.expect( AuthenticationException.class );
+ e.expect( InvalidSessionIdException.class );
e.expectMessage( "The actual sessionId
'6ba7b812-9dad-11d1-80b4-00c04fd430c8' does not match '"
+ serverSessionId + "'." );