public async Task ADLSWriteClientIdLargeFileContentsNoEmptyFileLeft() { AdlsTestHelper.CheckADLSEnvironment(); string filename = "largefilecheck_CSharp.txt"; string writeContents = new string('A', 100000000); ADLSAdapter adapter = AdlsTestHelper.CreateAdapterWithClientId(); adapter.Ctx = new ResolveContext(null, null); adapter.Ctx.FeatureFlags.Add("ADLSAdapter_deleteEmptyFile", true); try { await adapter.WriteAsync(filename, writeContents); } catch (Exception e) { } try { await adapter.ReadAsync(filename); } catch (Exception e) { Assert.IsTrue(e.Message.Contains("The specified path does not exist")); } }
private static async Task RunWriteReadTest(ADLSAdapter adapter) { string filename = $"WriteReadTest/{Environment.GetEnvironmentVariable("USERNAME")}_{Environment.GetEnvironmentVariable("COMPUTERNAME")}_CSharp.txt"; string writeContents = $"{DateTimeOffset.Now}\n{filename}"; await adapter.WriteAsync(filename, writeContents); string readContents = await adapter.ReadAsync(filename); Assert.IsTrue(string.Equals(writeContents, readContents)); }
public async Task ADLSWriteClientIdEmptyContentsNoEmptyFileLeft() { AdlsTestHelper.CheckADLSEnvironment(); string filename = "emptycheck_CSharp.txt"; string writeContents = ""; ADLSAdapter adapter = AdlsTestHelper.CreateAdapterWithClientId(); try { await adapter.WriteAsync(filename, writeContents); } catch (Exception e) {} try { await adapter.ReadAsync(filename); } catch (Exception e) { Assert.IsTrue(e.Message.Contains("The specified path does not exist")); } }