Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the broken PagedDoraWorkerTest #18150

Merged
merged 9 commits into from
Sep 19, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand Down Expand Up @@ -107,8 +106,6 @@ public void after() throws Exception {
}

@Test
@Ignore
// TODO(elega) fix this broken test
public void testLoad()
throws AccessControlException, ExecutionException, InterruptedException, TimeoutException,
IOException {
Expand All @@ -117,9 +114,10 @@ public void testLoad()
String ufsPath = mTestFolder.newFile("test").getAbsolutePath();
byte[] buffer = BufferUtils.getIncreasingByteArray((int) length);
BufferUtils.writeBufferToFile(ufsPath, buffer);
alluxio.grpc.File file =
alluxio.grpc.File.newBuilder().setUfsPath(ufsPath).setLength(length).setMountId(1).build();
ListenableFuture<List<LoadFileFailure>> load = mWorker.load(true, Collections.emptyList(),
UfsStatus ufsStatus = mWorker.getUfsInstance(ufsPath).getStatus(ufsPath);
ufsStatus.setUfsFullPath(new AlluxioURI(ufsPath));
List<UfsStatus> listUfsStatus = new ArrayList<>(Collections.singletonList(ufsStatus));
ListenableFuture<List<LoadFileFailure>> load = mWorker.load(true, listUfsStatus,
UfsReadOptions.newBuilder().setUser("test").setTag("1").setPositionShort(false).build());
List<LoadFileFailure> fileFailures = load.get(30, TimeUnit.SECONDS);
Assert.assertEquals(0, fileFailures.size());
Expand Down
Loading