@@ -0,0 +1,2234 @@
+/*%0A * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0%0A * (the %22License%22). You may not use this work except in compliance with the License, which is%0A * available at www.apache.org/licenses/LICENSE-2.0%0A *%0A * This software is distributed on an %22AS IS%22 basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,%0A * either express or implied, as more fully set forth in the License.%0A *%0A * See the NOTICE file distributed with this work for information regarding copyright ownership.%0A */%0A%0Apackage alluxio.master.block;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport alluxio.AlluxioURI;%0Aimport alluxio.Constants;%0Aimport alluxio.LocalAlluxioClusterResource;%0Aimport alluxio.PropertyKey;%0Aimport alluxio.client.FileSystemTestUtils;%0Aimport alluxio.client.WriteType;%0Aimport alluxio.client.file.FileSystem;%0Aimport alluxio.client.file.URIStatus;%0Aimport alluxio.client.file.options.CreateFileOptions;%0Aimport alluxio.client.file.policy.RoundRobinPolicy;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0A/**%0A * Tests a cluster containing multiple workers.%0A */%0Apublic final class MultiWorkerIntegrationTest %7B%0A  private static final int NUM_WORKERS = 4;%0A  private static final int WORKER_MEMORY_SIZE_BYTES = Constants.MB;%0A  private static final int BLOCK_SIZE_BYTES = WORKER_MEMORY_SIZE_BYTES / 2;%0A%0A  @Rule%0A  public LocalAlluxioClusterResource mResource =%0A      new LocalAlluxioClusterResource.Builder()%0A          .setProperty(PropertyKey.WORKER_MEMORY_SIZE, WORKER_MEMORY_SIZE_BYTES)%0A          .setProperty(PropertyKey.USER_BLOCK_SIZE_BYTES_DEFAULT, BLOCK_SIZE_BYTES)%0A          .setProperty(PropertyKey.USER_FILE_BUFFER_BYTES, BLOCK_SIZE_BYTES)%0A          .setNumWorkers(NUM_WORKERS)%0A          .build();%0A%0A  @Test%0A  public void workerCount() throws Exception %7B%0A    FileSystem fs = mResource.get().getClient();%0A    System.out.println(FileSystemTestUtils.listFiles(fs, %22/%22));%0A    FileSystemTestUtils.createByteFile(fs, %22/test%22, NUM_WORKERS * WORKER_MEMORY_SIZE_BYTES,%0A        CreateFileOptions.defaults().setWriteType(WriteType.MUST_CACHE)%0A            .setLocationPolicy(new RoundRobinPolicy()));%0A    URIStatus status = fs.getStatus(new AlluxioURI(%22/test%22));%0A    assertEquals(100, status.getInMemoryPercentage());%0A  %7D%0A%7D%0A

Add basic multi-worker test