You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the new tests from #8215 for DependencyProperty, there's a lot of re-use of data that are being passed to Register methods of DependencyProperty.
This would be fine on its own when testing for other things, but in tests specifically for Register methods, an ArgumentException can be thrown either because the property was already registered (SR.PropertyAlreadyRegistered) or when auto generation of default property metadata fails (SR.DefaultValueAutoAssignFailed).
This can cause flaky unit test results that do not clearly express where the problem is and require further debugging.
Failure example
For example, Register_InvokeStringTypeTypeValidateFail_Throws will fail if ran together with Register_InvokeStringTypeType_Success on the callCount assertion, because Register throws ArgumentException,
however due to the fact that the property was previously registered, not because the actual test case fails.
Other information
I will fix these myself by proper comparison of resource messages but I guess that will require first fixing the correct internals visibility between WindowsBase and WindowsBase.Tests or my VS is flaky at the moment. Assign to me please as I cannot without triage rights.
The text was updated successfully, but these errors were encountered:
The issue
In the new tests from #8215 for
DependencyProperty
, there's a lot of re-use of data that are being passed toRegister
methods ofDependencyProperty
.This would be fine on its own when testing for other things, but in tests specifically for
Register
methods, anArgumentException
can be thrown either because the property was already registered (SR.PropertyAlreadyRegistered
) or when auto generation of default property metadata fails (SR.DefaultValueAutoAssignFailed
).This can cause flaky unit test results that do not clearly express where the problem is and require further debugging.
Failure example
For example,
Register_InvokeStringTypeTypeValidateFail_Throws
will fail if ran together withRegister_InvokeStringTypeType_Success
on thecallCount
assertion, becauseRegister
throwsArgumentException
,however due to the fact that the property was previously registered, not because the actual test case fails.
Other information
I will fix these myself by proper comparison of resource messages but I guess that will require first fixing the correct internals visibility between WindowsBase and WindowsBase.Tests or my VS is flaky at the moment. Assign to me please as I cannot without triage rights.
The text was updated successfully, but these errors were encountered: