Search in sources :

Example 96 with TemporaryFolder

use of org.junit.rules.TemporaryFolder in project flink by apache.

the class TaskLocalStateStoreImplTest method before.

@Before
public void before() throws Exception {
    jobID = new JobID();
    allocationID = new AllocationID();
    jobVertexID = new JobVertexID();
    subtaskIdx = 0;
    this.temporaryFolder = new TemporaryFolder();
    this.temporaryFolder.create();
    this.allocationBaseDirs = new File[] { temporaryFolder.newFolder(), temporaryFolder.newFolder() };
    this.taskLocalStateStore = createTaskLocalStateStoreImpl(allocationBaseDirs, jobID, allocationID, jobVertexID, subtaskIdx);
}
Also used : AllocationID(org.apache.flink.runtime.clusterframework.types.AllocationID) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) TemporaryFolder(org.junit.rules.TemporaryFolder) JobID(org.apache.flink.api.common.JobID) Before(org.junit.Before)

Example 97 with TemporaryFolder

use of org.junit.rules.TemporaryFolder in project flink by apache.

the class SnapshotDirectoryTest method beforeClass.

@BeforeClass
public static void beforeClass() throws IOException {
    temporaryFolder = new TemporaryFolder();
    temporaryFolder.create();
}
Also used : TemporaryFolder(org.junit.rules.TemporaryFolder) BeforeClass(org.junit.BeforeClass)

Example 98 with TemporaryFolder

use of org.junit.rules.TemporaryFolder in project flink by apache.

the class StatefulOperatorChainedTaskTest method setup.

@Before
public void setup() throws IOException {
    RESTORED_OPERATORS.clear();
    temporaryFolder = new TemporaryFolder();
    temporaryFolder.create();
}
Also used : TemporaryFolder(org.junit.rules.TemporaryFolder) Before(org.junit.Before)

Example 99 with TemporaryFolder

use of org.junit.rules.TemporaryFolder in project flink by apache.

the class EventTimeWindowCheckpointingITCase method createClusterConfig.

protected Configuration createClusterConfig() throws IOException {
    TemporaryFolder temporaryFolder = new TemporaryFolder();
    temporaryFolder.create();
    final File haDir = temporaryFolder.newFolder();
    Configuration config = new Configuration();
    config.setString(AkkaOptions.FRAMESIZE, String.valueOf(MAX_MEM_STATE_SIZE) + "b");
    if (zkServer != null) {
        config.setString(HighAvailabilityOptions.HA_MODE, "ZOOKEEPER");
        config.setString(HighAvailabilityOptions.HA_ZOOKEEPER_QUORUM, zkServer.getConnectString());
        config.setString(HighAvailabilityOptions.HA_STORAGE_PATH, haDir.toURI().toString());
    }
    return config;
}
Also used : MiniClusterResourceConfiguration(org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration) Configuration(org.apache.flink.configuration.Configuration) TemporaryFolder(org.junit.rules.TemporaryFolder) File(java.io.File)

Example 100 with TemporaryFolder

use of org.junit.rules.TemporaryFolder in project maven-plugins by apache.

the class MinijarFilterTest method init.

@Before
public void init() throws IOException {
    TemporaryFolder tempFolder = new TemporaryFolder();
    tempFolder.create();
    this.emptyFile = tempFolder.newFile();
}
Also used : TemporaryFolder(org.junit.rules.TemporaryFolder) Before(org.junit.Before)

Aggregations

TemporaryFolder (org.junit.rules.TemporaryFolder)106 File (java.io.File)40 Before (org.junit.Before)28 Test (org.junit.Test)28 BeforeClass (org.junit.BeforeClass)13 URL (java.net.URL)7 Path (java.nio.file.Path)7 IOException (java.io.IOException)5 ArrayList (java.util.ArrayList)3 UserState (alluxio.security.user.UserState)2 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)2 RocksDBPersistenceProvider (com.iota.iri.storage.rocksDB.RocksDBPersistenceProvider)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 URISyntaxException (java.net.URISyntaxException)2 BdpDataPlanePlugin (org.batfish.bdp.BdpDataPlanePlugin)2 Batfish (org.batfish.main.Batfish)2 NotNull (org.jetbrains.annotations.NotNull)2 DefaultSafeModeManager (alluxio.master.DefaultSafeModeManager)1 InMemoryReferenceSequenceFile (au.edu.wehi.idsv.picard.InMemoryReferenceSequenceFile)1 SynchronousReferenceLookupAdapter (au.edu.wehi.idsv.picard.SynchronousReferenceLookupAdapter)1