diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-01-01 17:02:43 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-01-01 17:05:15 +0300 |
commit | 12db7639516c39b635278ce30a8bdb9c4a076bf9 (patch) | |
tree | bc1e7175b705adde023d197fba86403b6e15c0e8 /mcs | |
parent | 4791a674a1bf8cc74691974e363d9c5f5dd060a3 (diff) |
[System.Web] Fix WizardStepBase_Theme sharing violation error during test
We were sometimes seeing the following test failure on Jenkins:
```
Test Case Failures:
1) MonoTests.System.Web.UI.WebControls.WizardStepBaseTest.WizardStepBase_Theme : System.IO.IOException : Sharing violation on path /var/folders/wm/jvn0yl0d39q9sm9glcrhdrmw0000gn/T/tmp672264ba.tmp/App_Themes/Theme1/WizardTest.skin
at System.IO.File.SetLastWriteTime (System.String path, DateTime lastWriteTime) [0x00029] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/corlib/System.IO/File.cs:474
at MonoTests.SystemWeb.Framework.WebTest.CopyBinary (System.Byte[] sourceArray, System.String targetUrl) [0x00098] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs:364
at MonoTests.SystemWeb.Framework.WebTest.CopyResource (System.Type type, System.String resourceName, System.String targetUrl) [0x00059] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs:307
at MonoTests.System.Web.UI.WebControls.WizardStepBaseTest.WizardStepBase_Theme () [0x00000] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs:311
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
```
This happens because System.Web.UI.WebControls/ThemeTest.cs copies the WizardTest.skin file to the same App_Themes/Theme1 path in its setup method.
Since we're not interested in any particular theme in WizardStepBase_Theme we fix this by just using a different theme name (WizardStepBase instead of Theme1) so the two test fixtures don't clash.
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs index 03f41d9dbbc..c91f3cbf402 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs @@ -308,7 +308,7 @@ namespace MonoTests.System.Web.UI.WebControls [Category ("NunitWeb")] public void WizardStepBase_Theme () { - WebTest.CopyResource (GetType (), "WizardTest.skin", "App_Themes/Theme1/WizardTest.skin"); + WebTest.CopyResource (GetType (), "WizardTest.skin", "App_Themes/WizardStepBase/WizardTest.skin"); WebTest t = new WebTest (); PageDelegates pd = new PageDelegates (); pd.PreInit = set_properties; @@ -328,7 +328,7 @@ namespace MonoTests.System.Web.UI.WebControls public static void set_properties (Page p) { - p.Theme = "Theme1"; + p.Theme = "WizardStepBase"; } public static void theme (Page p) |