mirror of https://github.com/apache/cassandra
Fixed failing test
This commit is contained in:
parent
ec10d6b467
commit
003a2e7e15
|
|
@ -332,7 +332,9 @@ public class TrackedImportFailureTest extends TrackedTransferTestBase
|
|||
// Await cleanup of failed stream
|
||||
Uninterruptibles.sleepUninterruptibly(5, TimeUnit.SECONDS);
|
||||
|
||||
assertPendingDirs(cluster, (File pendingUuidDir) -> {
|
||||
// We exclude the missed instance because the SSTables streamed to the pending directory
|
||||
// are not linked to LocalTransfers and hence cleanup does not know which SSTables to cleanup
|
||||
assertPendingDirs(cluster.stream().filter(instance -> instance != missed).collect(Collectors.toList()), (File pendingUuidDir) -> {
|
||||
Assertions.assertThat(pendingUuidDir.listUnchecked(File::isFile)).isEmpty();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -196,12 +196,12 @@ public abstract class TrackedTransferTestBase extends TestBaseImpl
|
|||
assertPendingDirs(validate, KEYSPACE, forPendingUuidDir);
|
||||
}
|
||||
|
||||
protected static void assertPendingDirs(Iterable<IInvokableInstance> validate, String keysapce, IIsolatedExecutor.SerializableConsumer<File> forPendingUuidDir)
|
||||
protected static void assertPendingDirs(Iterable<IInvokableInstance> validate, String keyspace, IIsolatedExecutor.SerializableConsumer<File> forPendingUuidDir)
|
||||
{
|
||||
for (IInvokableInstance instance : validate)
|
||||
{
|
||||
instance.runOnInstance(() -> {
|
||||
Set<File> allPendingDirs = ColumnFamilyStore.getIfExists(keysapce, TABLE).getDirectories().getPendingLocations();
|
||||
Set<File> allPendingDirs = ColumnFamilyStore.getIfExists(keyspace, TABLE).getDirectories().getPendingLocations();
|
||||
for (File pendingDir : allPendingDirs)
|
||||
{
|
||||
File[] pendingUuidDirs = pendingDir.listUnchecked(File::isDirectory);
|
||||
|
|
|
|||
Loading…
Reference in New Issue