mirror of
https://github.com/apache/druid.git
synced 2025-02-09 11:34:54 +00:00
fix testSecuredGetServer ut (#3262)
This commit is contained in:
parent
06624c40c0
commit
fd798d32bc
@ -252,6 +252,10 @@ public class QueryResourceTest
|
|||||||
// WRITE corresponds to cancellation of query
|
// WRITE corresponds to cancellation of query
|
||||||
if (action.equals(Action.READ)) {
|
if (action.equals(Action.READ)) {
|
||||||
try {
|
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();
|
waitForCancellationLatch.await();
|
||||||
}
|
}
|
||||||
catch (InterruptedException e) {
|
catch (InterruptedException e) {
|
||||||
@ -295,7 +299,6 @@ public class QueryResourceTest
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
startAwaitLatch.countDown();
|
|
||||||
Response response = queryResource.doPost(
|
Response response = queryResource.doPost(
|
||||||
new ByteArrayInputStream(queryString.getBytes("UTF-8")),
|
new ByteArrayInputStream(queryString.getBytes("UTF-8")),
|
||||||
null,
|
null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user