@Test public void testType(TestContext context) throws Exception { Async async = context.async(); termHandler = term -> { context.assertEquals("vt100", term.type()); async.complete(); }; startShell(); Session session = createSession("paulo", "secret", false); session.connect(); Channel channel = session.openChannel("shell"); channel.connect(); }
@Test public void testType(TestContext context) throws Exception { Async async = context.async(); startTelnet(context, term -> { long now = System.currentTimeMillis(); vertx.setPeriodic(10, id -> { context.assertTrue(System.currentTimeMillis() - now < 10000); if (term.type() != null) { vertx.cancelTimer(id); context.assertEquals("xterm-color", term.type()); async.complete(); } }); }); client.connect("localhost", server.actualPort()); }