public async Task RunParallelEncryptionTest(Action encryptionAction) { // run it once before the multi-threading test to initialize global tables encryptionAction(); await GenerateParallelRunningEncryptionTask(encryptionAction, 10); RNG.Close(); }
public void TestOpenSSLEncryption() { // run it once before the multi-threading test to initialize global tables RunSingleOpenSSLEncryptionThread(); List <Thread> threads = new List <Thread>(); for (int i = 0; i < 10; i++) { Thread t = new Thread(new ThreadStart(RunSingleOpenSSLEncryptionThread)); threads.Add(t); t.Start(); } foreach (Thread t in threads) { t.Join(); } RNG.Close(); Assert.IsFalse(encryptionFailed); }
public void OneTimeTearDown() { RNG.Close(); }
public void TearDown() { RNG.Close(); // reset flag in case they interfere each other encryptionFailed = false; }