Skip to content

Fix for AppDomain creation should honor runsettings - #427

Merged
Jayarani garg (jayaranigarg) merged 3 commits into
microsoft:masterfrom
jayaranigarg:appdomainfix
May 24, 2018
Merged

Jayarani garg (jayaranigarg) merged 3 commits into
microsoft:masterfrom
jayaranigarg:appdomainfix

Conversation

@jayaranigarg

Copy link
Copy Markdown
Member

No description provided.

@nigurr Nitin Gurram (nigurr) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do add test for enabled case too. thanks

if (this.runSettings != null && MSTestAdapterSettings.IsAppDomainCreationDisabled(this.runSettings.SettingsXml))
{
this.isAppDomainCreationDisabled = true;
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the function name to IsAppDomainCreationDisabledInRunSettings make return type bool. or assign value of this.runSettings != null && MSTestAdapterSettings.IsAppDomainCreationDisabled(this.runSettings.SettingsXml) to isAppDomainCreationDisabled in .ctor and remove this function.

var mockRunSettings = new Mock<IRunSettings>();
mockRunSettings.Setup(rs => rs.SettingsXml).Returns(runSettingxml);

Mock<TestSourceHost> sourceHost = new Mock<TestSourceHost>(location, mockRunSettings.Object, null) { CallBase = true };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: testSourceHost

@jayaranigarg

Copy link
Copy Markdown
Member Author

dotnet bot (@dotnet-bot) Test Windows / Release Build please

@jayaranigarg
Jayarani garg (jayaranigarg) merged commit c5184f9 into microsoft:master May 24, 2018
@jayaranigarg
Jayarani garg (jayaranigarg) deleted the appdomainfix branch May 24, 2018 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants