agave-systems/systems-core/src/test/java/org/iplantc/service/transfer/performance/AbstractPerformanceTest.java
/**
	 * Creates the test data file to upload and download. 
	 * @throws IOException
	 */
Creates the test data file to upload and download.
Creates the test data file to upload and download .
protected void initTestData() throws IOException
	{
		tempDir = Files.createTempDir();
		downloadFile = new File(tempDir, "download.dat");
		sourceFile = new File(tempDir, "upload.dat");
sourceFileChecksum = calculateChecksum(sourceFile);
sourceTree = randomDirectoryTree.createTree(true);
RandomAccessFile raf = null;
try {
	raf = new RandomAccessFile(sourceFile, "rw");
	raf.setLength(1024 * 1024 * 1024);
}
finally {
	raf.close();
}
java.util.Random rnd = new java.util.Random();
FileOutputStream out = new FileOutputStream(sourceFile);
byte[] buf = new byte[1024000];
for (int i = 0; i < 10; i++) {
	rnd.nextBytes(buf);
	out.write(buf);
}
out.close();
		System.out.println("Input file size: " + sourceFile.length());
	}
protected void initTestData ( ) throws IOException { tempDir = Files . createTempDir ( ) ; downloadFile = new File ( tempDir , "download.dat" ) ; sourceFile = new File ( tempDir , "upload.dat" ) ; System . out . println ( "Input file size: " + sourceFile . length ( ) ) ; }
Creates the test data file to upload and download.
Creates the test data file to upload and download .
// create a temp file //		RandomDirectoryTree randomDirectoryTree = new RandomDirectoryTree(tempDir); //		randomDirectoryTree.createFile(sourceFile, 1024 * 1024 * 1024); //		 //		sourceFileChecksum = calculateChecksum(sourceFile); //		 //		sourceTree = randomDirectoryTree.createTree(true); //		RandomAccessFile raf = null; //		try { //			raf = new RandomAccessFile(sourceFile, "rw"); //			raf.setLength(1024 * 1024 * 1024); //		} //		finally { //			raf.close(); //		} //		java.util.Random rnd = new java.util.Random(); // //		FileOutputStream out = new FileOutputStream(sourceFile); //		byte[] buf = new byte[1024000]; //		for (int i = 0; i < 10; i++) { //			rnd.nextBytes(buf); //			out.write(buf); //		} //		out.close();