Add latch countdown on failure in CCR license tests (#33548)
We have some listeners in the CCR license tests that invoke Assert#fail if the onSuccess method for the listener is unexpectedly invoked. This can leave the main test thread hanging until the test suite times out rather than failing quickly. This commit adds some latch countdowns so that we fail quickly if these cases are hit.
This commit is contained in:
parent
9073dbefd6
commit
edc492419b
|
@ -47,6 +47,7 @@ public class CcrLicenseIT extends ESSingleNodeTestCase {
|
||||||
new ActionListener<AcknowledgedResponse>() {
|
new ActionListener<AcknowledgedResponse>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(final AcknowledgedResponse response) {
|
public void onResponse(final AcknowledgedResponse response) {
|
||||||
|
latch.countDown();
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ public class CcrLicenseIT extends ESSingleNodeTestCase {
|
||||||
new ActionListener<CreateAndFollowIndexAction.Response>() {
|
new ActionListener<CreateAndFollowIndexAction.Response>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(final CreateAndFollowIndexAction.Response response) {
|
public void onResponse(final CreateAndFollowIndexAction.Response response) {
|
||||||
|
latch.countDown();
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +88,7 @@ public class CcrLicenseIT extends ESSingleNodeTestCase {
|
||||||
client().execute(CcrStatsAction.INSTANCE, new CcrStatsAction.TasksRequest(), new ActionListener<CcrStatsAction.TasksResponse>() {
|
client().execute(CcrStatsAction.INSTANCE, new CcrStatsAction.TasksRequest(), new ActionListener<CcrStatsAction.TasksResponse>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(final CcrStatsAction.TasksResponse tasksResponse) {
|
public void onResponse(final CcrStatsAction.TasksResponse tasksResponse) {
|
||||||
|
latch.countDown();
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue