public void ThreadSafety() { AsyncTestTask t1 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); AsyncTestTask t2 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); AsyncTestTask t3 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); AsyncTestTask t4 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); t1.AssertNoException(); t2.AssertNoException(); t3.AssertNoException(); t4.AssertNoException(); }
public void ThreadSafety() { AsyncTestTask t1 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); AsyncTestTask t2 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); AsyncTestTask t3 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); AsyncTestTask t4 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); t1.AssertNoException(); t2.AssertNoException(); t3.AssertNoException(); t4.AssertNoException(); }
public void ThreadSafety() { #if NETCOREAPP const string providerName = "SqlServer"; #else const string providerName = "SqlServer-2.0"; #endif AsyncTestTask t1 = new AsyncTestDbProviderFactory(1000, providerName).Start(); AsyncTestTask t2 = new AsyncTestDbProviderFactory(1000, providerName).Start(); AsyncTestTask t3 = new AsyncTestDbProviderFactory(1000, providerName).Start(); AsyncTestTask t4 = new AsyncTestDbProviderFactory(1000, providerName).Start(); t1.AssertNoException(); t2.AssertNoException(); t3.AssertNoException(); t4.AssertNoException(); }