3636import javax .naming .ConfigurationException ;
3737
3838import org .apache .logging .log4j .Logger ;
39+ import com .cloud .utils .nio .NioClient ;
3940import org .junit .Before ;
4041import org .junit .Test ;
4142import org .junit .runner .RunWith ;
4546import com .cloud .resource .ServerResource ;
4647import com .cloud .utils .backoff .impl .ConstantTimeBackoff ;
4748import com .cloud .utils .nio .Link ;
48- import com .cloud .utils .nio .NioConnection ;
4949
5050@ RunWith (MockitoJUnitRunner .class )
5151public class AgentTest {
@@ -224,7 +224,7 @@ public void testStopAndCleanupConnectionConnectionIsNullDoesNothing() {
224224
225225 @ Test
226226 public void testStopAndCleanupConnectionValidConnectionNoWaitStopsAndCleansUp () throws IOException {
227- NioConnection mockConnection = mock (NioConnection .class );
227+ NioClient mockConnection = mock (NioClient .class );
228228 agent .connection = mockConnection ;
229229 agent .stopAndCleanupConnection (false );
230230 verify (mockConnection ).stop ();
@@ -233,7 +233,7 @@ public void testStopAndCleanupConnectionValidConnectionNoWaitStopsAndCleansUp()
233233
234234 @ Test
235235 public void testStopAndCleanupConnectionCleanupThrowsIOExceptionLogsWarning () throws IOException {
236- NioConnection mockConnection = mock (NioConnection .class );
236+ NioClient mockConnection = mock (NioClient .class );
237237 agent .connection = mockConnection ;
238238 doThrow (new IOException ("Cleanup failed" )).when (mockConnection ).cleanUp ();
239239 agent .stopAndCleanupConnection (false );
@@ -243,7 +243,7 @@ public void testStopAndCleanupConnectionCleanupThrowsIOExceptionLogsWarning() th
243243
244244 @ Test
245245 public void testStopAndCleanupConnectionValidConnectionWaitForStopWaitsForStartupToStop () throws IOException {
246- NioConnection mockConnection = mock (NioConnection .class );
246+ NioClient mockConnection = mock (NioClient .class );
247247 ConstantTimeBackoff mockBackoff = mock (ConstantTimeBackoff .class );
248248 mockBackoff .setTimeToWait (0 );
249249 agent .connection = mockConnection ;
0 commit comments