Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Commit

Permalink
Added TLS unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffyfox committed May 31, 2018
1 parent 2de5416 commit f744369
Showing 1 changed file with 27 additions and 0 deletions.
Expand Up @@ -54,6 +54,33 @@ public void testGet() throws InterruptedException
}
}

/**
* Tests a basic GET request for tls v1.1
* @throws InterruptedException
*/
public void testTlsV1_1() throws InterruptedException
{
final CountDownLatch signal = new CountDownLatch(1);

new AsyncHttpClient("https://tls-v1-1.badssl.com:1011/")
.get(new StringResponseHandler()
{
@Override public void onFinish()
{
Assert.assertNotNull(getContent());

signal.countDown();
}
});

signal.await(60, TimeUnit.SECONDS);

if (signal.getCount() != 0)
{
Assert.fail();
}
}

/**
* Tests the response handler publish methods are called in chunks
* @throws InterruptedException
Expand Down

0 comments on commit f744369

Please sign in to comment.