fix testSecuredGetServer ut (#3262)

This commit is contained in:
Parag Jain 2016-07-20 12:20:13 -05:00 committed by Fangjin Yang
parent 06624c40c0
commit fd798d32bc
1 changed files with 4 additions and 1 deletions

View File

@ -252,6 +252,10 @@ public class QueryResourceTest
// WRITE corresponds to cancellation of query
if (action.equals(Action.READ)) {
try {
// Countdown startAwaitLatch as we want query cancellation to happen
// after we enter isAuthorized method so that we can handle the
// InterruptedException here because of query cancellation
startAwaitLatch.countDown();
waitForCancellationLatch.await();
}
catch (InterruptedException e) {
@ -295,7 +299,6 @@ public class QueryResourceTest
public void run()
{
try {
startAwaitLatch.countDown();
Response response = queryResource.doPost(
new ByteArrayInputStream(queryString.getBytes("UTF-8")),
null,