@Before public void setUp() throws Exception { AzureBlobStorageTestAccount account = createTestAccount(); assumeNotNull(account); bindToTestAccount(account); }
/** * Return a blob path bonded to this method name, unique to this fork during * parallel execution. * @return a method name unique to (fork, method). * @throws IOException IO problems */ protected Path methodBlobPath() throws IOException { return blobPath(methodName.getMethodName()); }
@Override public Configuration createConfiguration() { Configuration conf = super.createConfiguration(); conf.setBoolean(NativeAzureFileSystem.APPEND_SUPPORT_ENABLE_PROPERTY_NAME, true); return conf; }
@Override public void setUp() throws Exception { super.setUp(); testPath = methodPath(); }
@Override public void tearDown() throws Exception { super.tearDown(); backingStore = null; }
/** * Get the configuration used to create the filesystem * @return the configuration of the test FS */ protected Configuration getConfiguration() { return getFileSystem().getConf(); }
/** * Return a path bonded to this method name, unique to this fork during * parallel execution. * @return a method name unique to (fork, method). * @throws IOException IO problems */ protected Path methodPath() throws IOException { return path(methodName.getMethodName()); }
@After public void tearDown() throws Exception { describe("closing test account and filesystem"); testAccount = cleanupTestAccount(testAccount); IOUtils.closeStream(fs); fs = null; }
@Override public void setUp() throws Exception { super.setUp(); fs = getFileSystem(); }
@After public void tearDown() throws Exception { if (inputStream != null) { inputStream.close(); } ContractTestUtils.rm(fs, testPath, true, true); super.tearDown(); }
/** * Return a path to a blob which will be unique for this fork. * @param filepath filepath * @return a path under the default blob directory * @throws IOException */ protected Path blobPath(String filepath) throws IOException { return blobPathForTests(getFileSystem(), filepath); }
@Override public void setUp() throws Exception { super.setUp(); root = fs.getUri().toString(); }
@Override public void tearDown() throws Exception { IOUtils.closeStream(inputStream); ContractTestUtils.rm(fs, testPath, true, false); ContractTestUtils.rm(fs, testFolderPath, true, false); super.tearDown(); }
/** * Create a path under the test path provided by * the FS contract. * @param filepath path string in * @return a path qualified by the test filesystem * @throws IOException IO problems */ protected Path path(String filepath) throws IOException { return pathForTests(getFileSystem(), filepath); }
@Override public Configuration createConfiguration() { Configuration conf = super.createConfiguration(); conf.set(NativeAzureFileSystem.KEY_AZURE_AUTHORIZATION, "true"); conf.set(KEY_USE_SECURE_MODE, "true"); conf.set(RemoteWasbAuthorizerImpl.KEY_REMOTE_AUTH_SERVICE_URLS, "http://localhost/"); conf.set(NativeAzureFileSystem.AZURE_CHOWN_USERLIST_PROPERTY_NAME, "user1 , user2"); conf.set(KEY_AUTH_SERVICE_CACHING_ENABLE, "false"); conf.set(NativeAzureFileSystem.AZURE_CHMOD_USERLIST_PROPERTY_NAME, "user1 , user2"); conf.set(NativeAzureFileSystem.AZURE_DAEMON_USERLIST_PROPERTY_NAME, "hive , hcs , yarn"); return conf; }
@Override public void setUp() throws Exception { super.setUp(); boolean useSecureMode = fs.getConf().getBoolean(KEY_USE_SECURE_MODE, false); boolean useAuthorization = fs.getConf() .getBoolean(NativeAzureFileSystem.KEY_AZURE_AUTHORIZATION, false); Assume.assumeTrue("Test valid when both SecureMode and Authorization are enabled .. skipping", useSecureMode && useAuthorization); }
@Override public void setUp() throws Exception { super.setUp(); testPath = path("testfile.dat"); testFolderPath = path("testfolder"); }
@Override public void setUp() throws Exception { super.setUp(); testPath = path("testfile.dat"); testFolderPath = path("testfolder"); }
@Override public void setUp() throws Exception { super.setUp(); LOG.debug("Scale test operation count = {}", getOperationCount()); assumeScaleTestsEnabled(getConfiguration()); }
@Override public void setUp() throws Exception { super.setUp(); createTestAccount(); hugefile = fs.makeQualified(TEST_FILE_PATH); try { testFileStatus = fs.getFileStatus(TEST_FILE_PATH); testFileLength = testFileStatus.getLen(); } catch (FileNotFoundException e) { // file doesn't exist testFileLength = 0; } }