1
Vote

Designer Intermittent add/find template test failures on VS2013

description

I am seeing some tests failing intermittently on VS2013. These tests always pass on VS2012 they also pass on re-run. Would be good to investigate and figure out the root cause of the problem to make sure it is not a bug in the designer. See the build history on the CI box. Here is an example from the build log when the problem happens:

[15:16:07] Passed FindDbContextTemplate_finds_the_EF5_CSharp_web_site_template_when_targeting_dotNET4_web_site_with_CSharp
[15:16:11] Failed FindDbContextTemplate_finds_the_EF5_CSharp_web_site_template_when_targeting_dotNET4_5_web_site_with_CSharp
[15:16:11] Standard Output Messages:
[15:16:11]
[15:16:11]
[15:16:11] Debug Trace:
[15:16:11] Web Publish Package: Entering ProjectOpened
[15:16:11] Web Publish Package: Creating a new project publish data
[15:16:11] Web Publish Package: Exiting ProjectOpened
[15:16:11] Web Publish Package: Entering GetPublishableProjectCfg
[15:16:11] Web Publish Package: Exiting GetPublishableProjectCfg
[15:16:11]
[15:16:11] Passed FindDbContextTemplate_finds_the_EF5_VB_web_site_template_when_targeting_dotNET4_web_site_with_VB
[15:16:11]EXEC : error Message: [C:\BuildAgent\work\f2d314923a6e49a8\EFDesigner.msbuild]
[15:16:11] Test method EFDesigner.InProcTests.AutomaticDbContextTests.FindDbContextTemplate_finds_the_EF5_CSharp_web_site_template_when_targeting_dotNET4_5_web_site_with_CSharp threw exception:
[15:16:11] System.InvalidOperationException: Sequence contains no matching element
[15:16:11] Stack Trace:
[15:16:11] at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
[15:16:11] at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
[15:16:11] at System.Windows.Forms.Control.Invoke(Delegate method)
[15:16:11] at Microsoft.VisualStudio.TestTools.VsIdeTesting.UIThreadInvoker.Invoke(Delegate method)
[15:16:11] at EFDesignerTestInfrastructure.VS.UITestRunner.Execute(Action action) in c:\BuildAgent\work\f2d314923a6e49a8\test\TestInfrastructure\VS\UITestRunner.cs:line 31
[15:16:11] at EFDesigner.InProcTests.AutomaticDbContextTests.FindDbContextTemplate_finds_the_EF5_CSharp_web_site_template_when_targeting_dotNET4_5_web_site_with_CSharp() in c:\BuildAgent\work\f2d314923a6e49a8\test\InProcTests\AutomaticDbContextTests.cs:line 144
[15:16:12] Passed FindDbContextTemplate_finds_the_EF5_VB_web_site_template_when_targeting_dotNET4_5_web_site_with_VB
[15:16:12] Passed FindDbContextTemplate_finds_the_EF6_CSharp_template
[15:16:15] Passed FindDbContextTemplate_finds_the_EF6_VB_template
[15:16:15] Passed FindDbContextTemplate_finds_the_EF6_CSharp_web_site_template
[15:16:15] Passed FindDbContextTemplate_finds_the_EF6_VB_web_site_template
[15:16:37] Passed AddDbContextTemplates_does_not_add_the_template_items_to_the_item_collection_when_targeting_dotNET3_5
[15:16:37] Passed AddDbContextTemplates_adds_the_template_items_nested_under_the_EDMX_item
[15:16:43] Passed AddDbContextTemplates_does_not_nest_existing_tt_files_or_non_tt_files_added_at_the_same_time_as_the_template_items
[15:17:00] Failed AddDbContextTemplates_adds_the_template_items_to_the_item_collection_for_a_website_project
[15:17:00] Standard Output Messages:
[15:17:00]
[15:17:00]
[15:17:00] Debug Trace:
[15:17:00] Web Publish Package: Entering ProjectOpened
[15:17:00] Web Publish Package: Creating a new project publish data
[15:17:00] Web Publish Package: Exiting ProjectOpened
[15:17:00] Web Publish Package: Entering GetPublishableProjectCfg
[15:17:00] Web Publish Package: Exiting GetPublishableProjectCfg
[15:17:00] There are now 1 Edit Locks, and 1 Read Locks.
[15:17:00]
[15:17:00]EXEC : error Message: [C:\BuildAgent\work\f2d314923a6e49a8\EFDesigner.msbuild]
[15:17:00] Assert.IsTrue failed.
[15:17:00] Stack Trace:
[15:17:00] at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
[15:17:00] at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
[15:17:00] at System.Windows.Forms.Control.Invoke(Delegate method)
[15:17:00] at Microsoft.VisualStudio.TestTools.VsIdeTesting.UIThreadInvoker.Invoke(Delegate method)
[15:17:00] at EFDesignerTestInfrastructure.VS.UITestRunner.Execute(Action action) in c:\BuildAgent\work\f2d314923a6e49a8\test\TestInfrastructure\VS\UITestRunner.cs:line 31
[15:17:00] at EFDesigner.InProcTests.AutomaticDbContextTests.AddDbContextTemplates_adds_the_template_items_to_the_item_collection_for_a_website_project() in c:\BuildAgent\work\f2d314923a6e49a8\test\InProcTests\AutomaticDbContextTests.cs:line 304
[15:17:06] Passed AddAndNestCodeGenTemplates_does_not_fail_if_EDMX_project_item_is_null
[15:17:06] Passed AddNewItemDialogFilter_only_accepts_items_with_file_names_for_well_known_template_types
[15:17:06] Passed ChangeEntityTypeShapeFillColorTest

file attachments

comments

RoMiller wrote Jul 11, 2013 at 11:05 PM

EF Team Triage: We should test that this scenario works. Once we confirm it's just a test issue we can punt this issue to Future.

moozzyk wrote Jul 22, 2013 at 5:26 PM

It seems that the tests are trying to look for templates in a stale folder. When the folder does not exist the test fail. Attaching a trx file. The run was started on 7/22 (pawelka_PAWELKA-DEV 2013-07-22 08_56_51.trx) but the test was trying to load templates from c:\Source\EFDesigner\test\InProcTests\bin\Debug\TestResults\pawelka_PAWELKA-DEV 2013-04-18 11_33_44\DbContextCSharpNet45Web

moozzyk wrote Jul 22, 2013 at 5:28 PM

Attaching the file.

moozzyk wrote Jul 22, 2013 at 5:29 PM

Attaching the file.

RoMiller wrote Dec 12, 2013 at 9:40 PM

EF Team Triage: Moving issues with Impact set to Low out of the 6.1.0 release as we only have time to address High and Medium issues in this release. We will re-triage these issues for future releases.

This does not exclude someone outside of the Microsoft EF team from contributing the change/fix in 6.1.0.