File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
test/framework/src/main/java/org/elasticsearch/test Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 164164import java .util .concurrent .atomic .AtomicLong ;
165165import java .util .function .BooleanSupplier ;
166166import java .util .function .Function ;
167+ import java .util .stream .Collectors ;
167168
168169import static org .elasticsearch .client .Requests .syncedFlushRequest ;
169170import static org .elasticsearch .cluster .metadata .IndexMetaData .SETTING_NUMBER_OF_REPLICAS ;
@@ -535,13 +536,10 @@ protected final void afterInternal(boolean afterClass) throws Exception {
535536 for (Discovery discovery : internalCluster ().getInstances (Discovery .class )) {
536537 if (discovery instanceof ZenDiscovery ) {
537538 final ZenDiscovery zenDiscovery = (ZenDiscovery ) discovery ;
538- assertBusy (new Runnable () {
539- @ Override
540- public void run () {
541- assertThat ("still having pending states: " + Strings .arrayToDelimitedString (zenDiscovery .pendingClusterStates (), "\n " ),
542- zenDiscovery .pendingClusterStates (), emptyArray ());
543- }
544- });
539+ assertBusy (() -> assertThat (zenDiscovery .localNode ().getName () + " still having pending states: \n " +
540+ Arrays .stream (zenDiscovery .pendingClusterStates ()).map (ClusterState ::prettyPrint )
541+ .collect (Collectors .joining ("\n " )),
542+ zenDiscovery .pendingClusterStates (), emptyArray ()));
545543 }
546544 }
547545 }
You can’t perform that action at this time.
0 commit comments