XUnit/JustMock Fatal Error - System.ArgumentException

6 posts, 0 answers
  1. David
    David avatar
    6 posts
    Member since:
    Jun 2014

    Posted 06 Jun 2017 Link to this post

    Not sure if this is an XUnit.Net or JustMock (or both) issue.  I have several tests on a solution that run and show passed but grayed out after a test run or build.  VS2017 shows "Unexpected error detected.  Check the Tests Output Pane for details.   The Test Output pane has a dump (see below).  The tests when run individually seem to pass and generate no errors, only when "Run All Tests" or as a result of a Build (run all tests after build set) do you see several tests grayed out.  It's always the same four tests.  Three have JustMock objects, one does not.

    VS2017 Enterprise 15.2 (26430.12)

    JustMock 2017.2.5303.3 (internal build to fix the 2017 profiler item)

    This might be an internal build issue which is why I'm not logging it as a ticket, but thought I'd throw this in here to let you know about it.  

     

    ------ Run test started ------
    [xUnit.net 00:00:00.2643557]   Discovering: UnitTests
    [xUnit.net 00:00:01.0713800]   Discovered:  UnitTests
    [xUnit.net 00:00:01.4834782]   Starting:    UnitTests
    [xUnit.net 00:00:03.0127894]     [FATAL ERROR] System.ArgumentException
    [xUnit.net 00:00:03.0171999]       System.ArgumentException : 'this' type cannot be an interface itself.
    [xUnit.net 00:00:03.0198958]       Stack Trace:
    [xUnit.net 00:00:03.0207009]        
    [xUnit.net 00:00:03.0214322]         Server stack trace:
    [xUnit.net 00:00:03.0221175]            at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle handle, RuntimeTypeHandle interfaceHandle)
    [xUnit.net 00:00:03.0227770]            at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle interfaceHandle)
    [xUnit.net 00:00:03.0232817]            at System.RuntimeType.GetInterfaceMap(Type ifaceType)
    [xUnit.net 00:00:03.0239207]            at Telerik.JustMock.Core.MockingUtil.IsImplementedBy(MethodInfo interfaceMethod, MethodBase implMethod)
    [xUnit.net 00:00:03.0243577]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.MatchTestClassDispose(MethodBase method, String[] testMethodAttributes)
    [xUnit.net 00:00:03.0249418]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<>c__DisplayClass31.<SetupStandardHierarchicalTestStructure>b__1f(MethodBase method)
    [xUnit.net 00:00:03.0255662]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<>c__DisplayClassa.<FindTestMethod>b__9(RepositoryOperationsBase repo)
    [xUnit.net 00:00:03.0261179]            at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
    [xUnit.net 00:00:03.0266557]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<FindTestMethod>b__8(MethodBase method)
    [xUnit.net 00:00:03.0271733]            at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
    [xUnit.net 00:00:03.0276714]            at System.Linq.Enumerable.<DistinctIterator>d__63`1.MoveNext()
    [xUnit.net 00:00:03.0281930]            at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
    [xUnit.net 00:00:03.0286994]            at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    [xUnit.net 00:00:03.0292425]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.FindTestMethod(Int32& repoIdx, RepositoryOperationsBase& entryOps)
    [xUnit.net 00:00:03.0297270]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
    [xUnit.net 00:00:03.0301511]            at Telerik.JustMock.Core.Context.MockingContext.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
    [xUnit.net 00:00:03.0305562]            at Telerik.JustMock.Core.MocksRepository.GetMockMixin(Object obj, Type objType)
    [xUnit.net 00:00:03.0309488]            at Telerik.JustMock.Core.Invocation..ctor(Object instance, MethodBase method, Object[] args)
    [xUnit.net 00:00:03.0313652]            at Telerik.JustMock.Core.ProfilerInterceptor.InterceptCall(RuntimeTypeHandle typeHandle, RuntimeMethodHandle methodHandle, Object[] data)
    [xUnit.net 00:00:03.0318462]            at System.MarshalByRefObject.GetIdentity(MarshalByRefObject obj, Boolean& fServer)
    [xUnit.net 00:00:03.0323720]            at System.Runtime.Remoting.IdentityHolder.FindOrCreateServerIdentity(MarshalByRefObject obj, String objURI, Int32 flags)
    [xUnit.net 00:00:03.0328321]            at System.Runtime.Remoting.RemotingServices.GetOrCreateIdentity(MarshalByRefObject Obj, String ObjURI, Boolean isInitializing)
    [xUnit.net 00:00:03.0363414]            at System.Runtime.Remoting.RemotingServices.MarshalInternal(MarshalByRefObject Obj, String ObjURI, Type RequestedType, Boolean updateChannelData, Boolean isInitializing)
    [xUnit.net 00:00:03.0369562]            at System.Runtime.Remoting.RemotingServices.MarshalInternal(MarshalByRefObject Obj, String ObjURI, Type RequestedType, Boolean updateChannelData)
    [xUnit.net 00:00:03.0375367]            at System.Runtime.Remoting.RemotingServices.MarshalInternal(MarshalByRefObject Obj, String ObjURI, Type RequestedType)
    [xUnit.net 00:00:03.0381086]            at System.Runtime.Remoting.Messaging.MessageSmuggler.FixupArg(Object arg, ArrayList& argsToSerialize)
    [xUnit.net 00:00:03.0386417]            at System.Runtime.Remoting.Messaging.MessageSmuggler.FixupArgs(Object[] args, ArrayList& argsToSerialize)
    [xUnit.net 00:00:03.0390906]            at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage..ctor(IMethodCallMessage mcm)
    [xUnit.net 00:00:03.0395394]            at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.SmuggleIfPossible(IMessage msg)
    [xUnit.net 00:00:03.0400477]            at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)
    [xUnit.net 00:00:03.0404910]        
    [xUnit.net 00:00:03.0408806]         Exception rethrown at [0]:
    [xUnit.net 00:00:03.0412930]            at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    [xUnit.net 00:00:03.0417710]            at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    [xUnit.net 00:00:03.0623429]     [FATAL ERROR] System.ArgumentException
    [xUnit.net 00:00:03.0998317]     [FATAL ERROR] System.ArgumentException
    [xUnit.net 00:00:04.3804395]   Finished:    UnitTests
    ========== Run test finished: 35 run (0:00:04.5228864) ==========
  2. David
    David avatar
    6 posts
    Member since:
    Jun 2014

    Posted 08 Jun 2017 Link to this post

    I believe I was able to find what triggers the exception.  A portion of my code works with the Windows Task Scheduler and when I create a Mock of that, it throws the error.  Below is the most simplistic example that will cause it to break.  The mocked object never gets evaluated or used in this particular test as the code in question throws an ArgumentNullException on the log object before it even gets to the mocked TaskService object.  The simple Mock.Create<TaskService>(); is sufficient to cause the error.  To verify, I even commented out all but the mock creation, so that the entire test function consists of only the Mock.Create<>() line and this causes the exception.  Interestingly, this only happens when it runs more than one test at a time.  If I run the one test function by itself, no error is emitted and the test comes back successful.  Also of interest, the test when run as a group returns and shows success, other tests that appear to be unrelated come back grayed out (guessing this is an ordering thing by the xunit test runner).

     

    [Fact]
    public void TaskManager_NullLog_ArgumentNullException()
    {
        ILog nullLog = null;
        var taskService = Mock.Create<TaskService>();
     
        Assert.Throws<ArgumentNullException>(
            () => new TaskManager(nullLog, taskService, _validTaskName, _validExecutable));
    }
    ------ Discover test started ------
    [xUnit.net 00:00:00.2025437]   Discovering: UnitTests
    [xUnit.net 00:00:00.5223735]   Discovered:  UnitTests
    ========== Discover test finished: 35 found (0:00:00.6044947) ==========
    ------ Run test started ------
    [xUnit.net 00:00:00.2506128]   Discovering: UnitTests
    [xUnit.net 00:00:00.9686320]   Discovered:  UnitTests
    [xUnit.net 00:00:01.2860414]   Starting:    UnitTests
    [xUnit.net 00:00:01.5454793]     UnitTests.TaskManagerTests.DestroyTask_FoundTask_RemovedSuccess [SKIP]
    [xUnit.net 00:00:01.5471900]       JustMock Bug
    [xUnit.net 00:00:02.4173040] UnitTests: Error occured while RecordEnd for test case UnitTests.HTMLReportTests.HTMLReport_NullLog_ArgumentNullException: System.ArgumentException: 'this' type cannot be an interface itself.
     
    Server stack trace:
       at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle handle, RuntimeTypeHandle interfaceHandle)
       at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle interfaceHandle)
       at System.RuntimeType.GetInterfaceMap(Type ifaceType)
       at Telerik.JustMock.Core.MockingUtil.IsImplementedBy(MethodInfo interfaceMethod, MethodBase implMethod)
       at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.MatchTestClassDispose(MethodBase method, String[] testMethodAttributes)
       at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<>c__DisplayClass31.<SetupStandardHierarchicalTestStructure>b__1f(MethodBase method)
       at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<>c__DisplayClassa.<FindTestMethod>b__9(RepositoryOperationsBase repo)
       at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
       at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<FindTestMethod>b__8(MethodBase method)
       at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
       at System.Linq.Enumerable.<DistinctIterator>d__63`1.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.FindTestMethod(Int32& repoIdx, RepositoryOperationsBase& entryOps)
       at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
       at Telerik.JustMock.Core.Context.MockingContext.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
       at Telerik.JustMock.Core.ProfilerInterceptor.DispatchInvocation(Invocation invocation)
       at Telerik.JustMock.Core.ProfilerInterceptor.InterceptCall(RuntimeTypeHandle typeHandle, RuntimeMethodHandle methodHandle, Object[] data)
       at System.MarshalByRefObject..ctor()
       at System.IO.Stream..ctor()
       at System.IO.MemoryStream..ctor(Int32 capacity)
       at System.IO.MemoryStream..ctor()
       at System.AppDomain.Serialize(Object o)
       at System.AppDomain.MarshalObject(Object o)
       at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
       at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
       at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)
     
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Xunit.Abstractions.IFinishedMessage.get_TestsSkipped()
       at Xunit.Runner.VisualStudio.TestAdapter.VsExecutionSink.GetAggregatedTestOutcome(ITestCaseFinished testCaseFinished)
       at Xunit.Runner.VisualStudio.TestAdapter.VsExecutionSink.<>c__DisplayClass24_0.<HandleTestCaseFinished>b__0()
       at Xunit.Runner.VisualStudio.TestAdapter.VsExecutionSink.TryAndReport(String actionDescription, ITestCase testCase, Action action)
    [xUnit.net 00:00:02.4883853]     UnitTests.TaskManagerTests.CreateTask_Success [SKIP]
    [xUnit.net 00:00:02.4902220]       JustMock Bug
    [xUnit.net 00:00:02.5175594]     UnitTests.TaskManagerTests.DestroyTask_MissingTask_ApplicationException [SKIP]
    [xUnit.net 00:00:02.5190885]       JustMock Bug
    [xUnit.net 00:00:02.5461362]     UnitTests.TaskManagerTests.TaskManager_NullExecutable_ArgumentNullException [SKIP]
    [xUnit.net 00:00:02.5477489]       JustMock Bug
    [xUnit.net 00:00:03.4690289]   Finished:    UnitTests
    ========== Run test finished: 35 run (0:00:03.5782765) ==========
  3. Kamen Ivanov
    Admin
    Kamen Ivanov avatar
    80 posts

    Posted 09 Jun 2017 Link to this post

    Hi David,

    Thank you for reaching us out, for the research and all the detailed information about this issue that you are experiencing.

    We did manage to reproduce the problem on our side executing the test with xUnit test runner and it seems to be an xUnit issue. A strange thing is that the error doesn't occur on each run but still occurs from time to time.

    We also tried to reproduce this behavior running the tests with MsTest and MsTest v2 but no exception is thrown then and everything works as expected.

    Regards,
    Kamen Ivanov
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  4. David
    David avatar
    6 posts
    Member since:
    Jun 2014

    Posted 09 Jun 2017 Link to this post

    Posted an issue on the xunit Github: System.ArgumentException #1316
  5. Developer
    Developer avatar
    5 posts
    Member since:
    Dec 2008

    Posted 23 Jul 2018 Link to this post

    I found this same error in the logs of my visual studio.com build. I can run all my unit tests in visual studio and they all pass. When I run them on the CI server (just mock installed on the build server and JustMock task used in the build pipeline definition), I have a unit test class with two xunit facts. If I uncomment all the code in either test, the other passes just fine. If I uncomment all the code in both tests so they both execute, I get the same exception shown in these logs. The xUnit bug posted on GitHub never got resolved. Here is my log.
    2018-07-23T19:16:41.6143342Z ##[section]Starting: JustMock VSTest - testAssemblies
    2018-07-23T19:16:41.6179183Z ==============================================================================
    2018-07-23T19:16:41.6179571Z Task         : Telerik JustMock VSTest v.2
    2018-07-23T19:16:41.6180019Z Description  : Use VSTest runner to run tests that are mocked with Telerik JustMock.
    2018-07-23T19:16:41.6180275Z Version      : 2.0.1
    2018-07-23T19:16:41.6180508Z Author       : Telerik
    2018-07-23T19:16:41.6180753Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=835764)
    2018-07-23T19:16:41.6181110Z ==============================================================================
    2018-07-23T19:16:43.4920812Z Setting up JustMock
    2018-07-23T19:16:43.4921432Z ======================================================
    2018-07-23T19:16:43.6718681Z Run the tests locally using vstest.console.exe
    2018-07-23T19:16:43.6718896Z ========================================================
    2018-07-23T19:16:43.6719506Z Test selector : Test assemblies
    2018-07-23T19:16:43.6719763Z Test assemblies : **\*test*.dll,!**\*TestAdapter.dll,!**\obj\**
    2018-07-23T19:16:43.6720005Z Test filter criteria : null
    2018-07-23T19:16:43.6720205Z Search folder : C:\agent_spatial\_work\5\s
    2018-07-23T19:16:43.6720407Z Run settings file : C:\agent_spatial\_work\5\s
    2018-07-23T19:16:43.6720666Z Run in parallel : false
    2018-07-23T19:16:43.6720849Z Run in isolation : true
    2018-07-23T19:16:43.6721965Z Path to custom adapters : null
    2018-07-23T19:16:43.6722156Z Other console options : null
    2018-07-23T19:16:43.6722350Z Code coverage enabled : false
    2018-07-23T19:16:43.6722715Z Rerun failed tests: false
    2018-07-23T19:16:43.6722982Z VisualStudio version selected for test execution : latest
    2018-07-23T19:16:44.4405162Z ========================================================
    2018-07-23T19:16:44.9069672Z Removing JustMock
    2018-07-23T19:16:44.9070171Z ======================================================
    2018-07-23T19:16:47.0282207Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @C:\agent_spatial\_work\_temp\ef455e61-8eac-11e8-8389-6f70ccd0a112.txt
    2018-07-23T19:16:54.5462534Z Microsoft (R) Test Execution Command Line Tool Version 15.0.26929.2
    2018-07-23T19:16:54.5463386Z Copyright (c) Microsoft Corporation.  All rights reserved.
    2018-07-23T19:16:54.5463993Z
    2018-07-23T19:16:54.5508423Z vstest.console.exe
    2018-07-23T19:16:54.5508832Z "C:\agent_spatial\_work\5\s\SpatialScene\Esri.ArcGISRuntime.Toolkit.WPF.Tests\bin\Release\Esri.ArcGISRuntime.Toolkit.WPF.Tests.dll"
    2018-07-23T19:16:54.5509287Z "C:\agent_spatial\_work\5\s\SpatialScene\SpatialScene.ConfigurationModule.Tests\bin\Release\SpatialScene.ConfigurationModule.Tests.dll"
    2018-07-23T19:16:54.5509666Z /InIsolation
    2018-07-23T19:16:54.5509921Z /logger:"trx"
    2018-07-23T19:16:54.5510521Z /TestAdapterPath:"C:\agent_spatial\_work\5\s"
    2018-07-23T19:16:57.3203330Z Starting test execution, please wait...
    2018-07-23T19:17:19.7019185Z Information: [xUnit.net 00:00:01.6303470]   Discovering: Esri.ArcGISRuntime.Toolkit.WPF.Tests
    2018-07-23T19:17:19.7020009Z
    2018-07-23T19:17:21.3623194Z Information: [xUnit.net 00:00:03.4924547]   Discovered:  Esri.ArcGISRuntime.Toolkit.WPF.Tests
    2018-07-23T19:17:21.3623965Z
    2018-07-23T19:17:21.4101782Z Information: [xUnit.net 00:00:03.5415631]   Starting:    Esri.ArcGISRuntime.Toolkit.WPF.Tests
    2018-07-23T19:17:21.4102264Z
    2018-07-23T19:17:27.6735915Z Information: [xUnit.net 00:00:09.8048849]   Finished:    Esri.ArcGISRuntime.Toolkit.WPF.Tests
    2018-07-23T19:17:27.6736337Z
    2018-07-23T19:17:28.7419128Z Passed   Esri.ArcGISRuntime.Toolkit.WPF.Tests.CompassTest.HeadingRotateTransformTest
    2018-07-23T19:17:28.7419546Z Information: [xUnit.net 00:00:10.5481194]   Discovering: SpatialScene.ConfigurationModule.Tests (app domain = on [no shadow copy], method display = ClassAndMethod)
    2018-07-23T19:17:28.7419712Z
    2018-07-23T19:17:28.7420283Z Information: [xUnit.net 00:00:10.8068307] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.ConfigurationTests.DownloadConfigurationDoesNotWriteDataIfOfflineFileIsNotOlderThanOnlineFile' (ID = '7f5cb560443ea1326d8134758ddcaddc7fcb5249')
    2018-07-23T19:17:28.7422017Z
    2018-07-23T19:17:28.7422237Z Information: [xUnit.net 00:00:10.8205915] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.ConfigurationTests.DownloadConfigurationWritesDataIfOfflineFileIsOlderThanOnlineFile' (ID = '02a11f24466f6eaa9c5cc9c19b085031b2f29458')
    2018-07-23T19:17:28.7422423Z
    2018-07-23T19:17:28.7422648Z Information: [xUnit.net 00:00:10.8324589] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.ConfigurationTests.ReadConfigurationReadsSectionFromOfflineFileAndDeserializesIt' (ID = '2e5a9cb89d3e1cb13fd5eb7e084a0ac08ee8355d')
    2018-07-23T19:17:28.7422821Z
    2018-07-23T19:17:28.7423046Z Information: [xUnit.net 00:00:10.8440703] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.ConfigurationTests.WriteConfigurationSerializesDataAndWritesSectionDataToOfflineFile' (ID = '2e650c9ec3a1f79cd728d56e2fd9e426fe6f99c1')
    2018-07-23T19:17:28.7423223Z
    2018-07-23T19:17:28.7423421Z Information: [xUnit.net 00:00:10.8578213] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.OfflineFileTests.IsNotOlderThanPastTimeTest' (ID = 'f12e96d858ad4c47936a2b2f7421fff8ed83de83')
    2018-07-23T19:17:28.7423576Z
    2018-07-23T19:17:28.7424364Z Information: [xUnit.net 00:00:10.8708190] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.OfflineFileTests2.IsOlderThanFutureTimeTest' (ID = 'a4420bc58a1c216cf9030b7dbf7dc0365fb93ae4')
    2018-07-23T19:17:28.7424678Z
    2018-07-23T19:17:28.7510996Z Information: [xUnit.net 00:00:10.8829174] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.OnlineFileTests.GetDataTest' (ID = '51c5d089a18decf63ab5ac8b2c88baf4f82594c9')
    2018-07-23T19:17:28.7511262Z
    2018-07-23T19:17:28.7735286Z Information: [xUnit.net 00:00:10.9053276] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.OnlineFileTests.GetModifiedTest' (ID = 'c716ac996748812f91ad583feddb79240a2ff6ad')
    2018-07-23T19:17:28.7735863Z
    2018-07-23T19:17:28.7831039Z Information: [xUnit.net 00:00:10.9148974] SpatialScene.ConfigurationModule.Tests: Discovered [execution] test case 'SpatialScene.ConfigurationModule.Tests.SerializerTests.SerializeDeserialize' (ID = '46673b0eb0d2d57ab806c2e799e250f45a7e1a49')
    2018-07-23T19:17:28.7831545Z
    2018-07-23T19:17:28.8507826Z Information: [xUnit.net 00:00:10.9817504]   Discovered:  SpatialScene.ConfigurationModule.Tests (running 9 test cases)
    2018-07-23T19:17:28.8509072Z
    2018-07-23T19:17:28.8568416Z Information: [xUnit.net 00:00:10.9883287]   Starting:    SpatialScene.ConfigurationModule.Tests (parallel test collections = off, max threads = 4)
    2018-07-23T19:17:29.8847184Z
    2018-07-23T19:17:29.8849542Z Passed   SpatialScene.ConfigurationModule.Tests.ConfigurationTests.DownloadConfigurationWritesDataIfOfflineFileIsOlderThanOnlineFile
    2018-07-23T19:17:29.8850011Z Passed   SpatialScene.ConfigurationModule.Tests.ConfigurationTests.ReadConfigurationReadsSectionFromOfflineFileAndDeserializesIt
    2018-07-23T19:17:31.3916437Z Passed   SpatialScene.ConfigurationModule.Tests.ConfigurationTests.WriteConfigurationSerializesDataAndWritesSectionDataToOfflineFile
    2018-07-23T19:17:31.3918926Z Passed   SpatialScene.ConfigurationModule.Tests.ConfigurationTests.DownloadConfigurationDoesNotWriteDataIfOfflineFileIsNotOlderThanOnlineFile
    2018-07-23T19:17:32.0928095Z Error: [xUnit.net 00:00:14.2056352]     [FATAL ERROR] System.ArgumentException
    2018-07-23T19:17:32.0928855Z Information: [xUnit.net 00:00:14.2154197]       System.ArgumentException : 'this' type cannot be an interface itself.
    2018-07-23T19:17:32.0930102Z
    2018-07-23T19:17:32.0930366Z Information: [xUnit.net 00:00:14.2220912]       Stack Trace:
    2018-07-23T19:17:32.0930762Z
    2018-07-23T19:17:32.0930912Z
    2018-07-23T19:17:32.0953848Z Information: [xUnit.net 00:00:14.2273677]        
    2018-07-23T19:17:32.0954144Z
    2018-07-23T19:17:32.0958349Z Information: [xUnit.net 00:00:14.2280420]         Server stack trace:
    2018-07-23T19:17:32.0958528Z
    2018-07-23T19:17:32.1012041Z Information: [xUnit.net 00:00:14.2331992]            at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle handle, RuntimeTypeHandle interfaceHandle)
    2018-07-23T19:17:32.1012355Z
    2018-07-23T19:17:32.1019275Z Information: [xUnit.net 00:00:14.2339038]            at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle interfaceHandle)
    2018-07-23T19:17:32.1019630Z
    2018-07-23T19:17:32.1024689Z Information: [xUnit.net 00:00:14.2345902]            at System.RuntimeType.GetInterfaceMap(Type ifaceType)
    2018-07-23T19:17:32.1025061Z
    2018-07-23T19:17:32.1030779Z Information: [xUnit.net 00:00:14.2352537]            at Telerik.JustMock.Core.MockingUtil.IsImplementedBy(MethodInfo interfaceMethod, MethodBase implMethod)
    2018-07-23T19:17:32.1031131Z
    2018-07-23T19:17:32.1037651Z Information: [xUnit.net 00:00:14.2359082]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.MatchTestClassDispose(MethodBase method, String[] testMethodAttributes)
    2018-07-23T19:17:32.1038060Z
    2018-07-23T19:17:32.1044231Z Information: [xUnit.net 00:00:14.2365784]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<>c__DisplayClass13_2.<SetupStandardHierarchicalTestStructure>b__5(MethodBase method)
    2018-07-23T19:17:32.1045371Z
    2018-07-23T19:17:32.1052364Z Information: [xUnit.net 00:00:14.2372494]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<>c__DisplayClass6_0.<FindTestMethod>b__1(RepositoryOperationsBase repo)
    2018-07-23T19:17:32.1059456Z
    2018-07-23T19:17:32.1059713Z Information: [xUnit.net 00:00:14.2381117]            at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
    2018-07-23T19:17:32.1059974Z
    2018-07-23T19:17:32.1069798Z Information: [xUnit.net 00:00:14.2388613]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.<FindTestMethod>b__6_0(MethodBase method)
    2018-07-23T19:17:32.1070228Z
    2018-07-23T19:17:32.1078387Z Information: [xUnit.net 00:00:14.2397713]            at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
    2018-07-23T19:17:32.1078872Z
    2018-07-23T19:17:32.1084070Z Information: [xUnit.net 00:00:14.2405920]            at System.Linq.Enumerable.<DistinctIterator>d__64`1.MoveNext()
    2018-07-23T19:17:32.1084287Z
    2018-07-23T19:17:32.1092575Z Information: [xUnit.net 00:00:14.2413396]            at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
    2018-07-23T19:17:32.1092865Z
    2018-07-23T19:17:32.1099790Z Information: [xUnit.net 00:00:14.2421596]            at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    2018-07-23T19:17:32.1100065Z
    2018-07-23T19:17:32.1109025Z Information: [xUnit.net 00:00:14.2429457]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.FindTestMethod(Int32& repoIdx, RepositoryOperationsBase& entryOps)
    2018-07-23T19:17:32.1109257Z
    2018-07-23T19:17:32.1122960Z Information: [xUnit.net 00:00:14.2439671]            at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
    2018-07-23T19:17:32.1123876Z
    2018-07-23T19:17:32.1133394Z Information: [xUnit.net 00:00:14.2451873]            at Telerik.JustMock.Core.Context.MockingContext.ResolveRepository(UnresolvedContextBehavior unresolvedContextBehavior)
    2018-07-23T19:17:32.1134075Z
    2018-07-23T19:17:32.1144421Z Information: [xUnit.net 00:00:14.2460956]            at Telerik.JustMock.Core.ProfilerInterceptor.DispatchInvocation(Invocation invocation)
    2018-07-23T19:17:32.1144934Z
    2018-07-23T19:17:32.1154941Z Information: [xUnit.net 00:00:14.2472396]            at Telerik.JustMock.Core.ProfilerInterceptor.InterceptCall(RuntimeTypeHandle typeHandle, RuntimeMethodHandle methodHandle, Object[] data)
    2018-07-23T19:17:32.1155200Z
    2018-07-23T19:17:32.1166788Z Information: [xUnit.net 00:00:14.2484501]            at System.MarshalByRefObject..ctor()
    2018-07-23T19:17:32.1167393Z
    2018-07-23T19:17:32.1179788Z Information: [xUnit.net 00:00:14.2496271]            at System.IO.Stream..ctor()
    2018-07-23T19:17:32.1182976Z
    2018-07-23T19:17:32.1190341Z Information: [xUnit.net 00:00:14.2507479]            at System.IO.MemoryStream..ctor(Byte[] buffer, Boolean writable)
    2018-07-23T19:17:32.1190990Z
    2018-07-23T19:17:32.1198884Z Information: [xUnit.net 00:00:14.2517880]            at System.IO.MemoryStream..ctor(Byte[] buffer)
    2018-07-23T19:17:32.1199270Z
    2018-07-23T19:17:32.1207651Z Information: [xUnit.net 00:00:14.2526539]            at System.Security.Claims.ClaimsPrincipal.DeserializeIdentities(String identities)
    2018-07-23T19:17:32.1208316Z
    2018-07-23T19:17:32.1213867Z Information: [xUnit.net 00:00:14.2535106]            at System.Security.Claims.ClaimsPrincipal.OnDeserializedMethod(StreamingContext context)
    2018-07-23T19:17:32.1214127Z
    2018-07-23T19:17:32.1223800Z Information: [xUnit.net 00:00:14.2543107]            at System.Runtime.Serialization.SerializationEventHandler.Invoke(StreamingContext context)
    2018-07-23T19:17:32.1224128Z
    2018-07-23T19:17:32.1234466Z Information: [xUnit.net 00:00:14.2553393]            at System.Runtime.Serialization.ObjectManager.RaiseDeserializationEvent()
    2018-07-23T19:17:32.1237832Z
    2018-07-23T19:17:32.1243172Z Information: [xUnit.net 00:00:14.2564017]            at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    2018-07-23T19:17:32.1243449Z
    2018-07-23T19:17:32.1254787Z Information: [xUnit.net 00:00:14.2573012]            at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    2018-07-23T19:17:32.1255012Z
    2018-07-23T19:17:32.1264547Z Information: [xUnit.net 00:00:14.2584004]            at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
    2018-07-23T19:17:32.1264869Z
    2018-07-23T19:17:32.1274736Z Information: [xUnit.net 00:00:14.2594155]            at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeMessageParts(MemoryStream stm)
    2018-07-23T19:17:32.1275032Z
    2018-07-23T19:17:32.1285571Z Information: [xUnit.net 00:00:14.2604629]            at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.FixupForNewAppDomain()
    2018-07-23T19:17:32.1285893Z
    2018-07-23T19:17:32.1299081Z Information: [xUnit.net 00:00:14.2616459]            at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
    2018-07-23T19:17:32.1299563Z
    2018-07-23T19:17:32.1307060Z Information: [xUnit.net 00:00:14.2626897]            at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
    2018-07-23T19:17:32.1307358Z
    2018-07-23T19:17:32.1318673Z Information: [xUnit.net 00:00:14.2636234]        
    2018-07-23T19:17:32.1318877Z
    2018-07-23T19:17:32.1326129Z Information: [xUnit.net 00:00:14.2644780]         Exception rethrown at [0]:
    2018-07-23T19:17:32.1326319Z
    2018-07-23T19:17:32.1338557Z Information: [xUnit.net 00:00:14.2655923]            at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    2018-07-23T19:17:32.1338770Z
    2018-07-23T19:17:32.1347993Z Information: [xUnit.net 00:00:14.2668255]            at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    2018-07-23T19:17:32.1348547Z
    2018-07-23T19:17:32.1360133Z Information: [xUnit.net 00:00:14.2677555]            at MessageSinkMessageExtensions.Dispatch[TMessage](IMessageSinkMessage message, HashSet`1 messageTypes, MessageHandler`1 callback)
    2018-07-23T19:17:32.1361480Z
    2018-07-23T19:17:32.1369955Z Information: [xUnit.net 00:00:14.2686712]            at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
    2018-07-23T19:17:32.1371989Z
    2018-07-23T19:17:32.1382311Z Information: [xUnit.net 00:00:14.2697180]            at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Object[]& outArgs)
    2018-07-23T19:17:32.1382663Z
    2018-07-23T19:17:32.1390879Z Information: [xUnit.net 00:00:14.2709068]            at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    2018-07-23T19:17:32.1391125Z
    2018-07-23T19:17:32.1400798Z Information: [xUnit.net 00:00:14.2720269]        
    2018-07-23T19:17:32.1401029Z
    2018-07-23T19:17:32.1407849Z Information: [xUnit.net 00:00:14.2729641]         Exception rethrown at [1]:
    2018-07-23T19:17:32.1408155Z
    2018-07-23T19:17:32.1418852Z Information: [xUnit.net 00:00:14.2737467]            at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    2018-07-23T19:17:32.1419008Z
    2018-07-23T19:17:32.1431781Z Information: [xUnit.net 00:00:14.2748634]            at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    2018-07-23T19:17:32.1432507Z
    2018-07-23T19:17:32.1488226Z Error: [xUnit.net 00:00:14.2805839] Catastrophic failure: System.ArgumentException : 'this' type cannot be an interface itself.
    2018-07-23T19:17:32.1488636Z
    2018-07-23T19:17:32.3212590Z Information: [xUnit.net 00:00:14.4525370]   Finished:    SpatialScene.ConfigurationModule.Tests
    2018-07-23T19:17:32.3212939Z
    2018-07-23T19:17:32.3984903Z Passed   SpatialScene.ConfigurationModule.Tests.OfflineFileTests2.IsOlderThanFutureTimeTest
    2018-07-23T19:17:32.3986546Z Passed   SpatialScene.ConfigurationModule.Tests.SerializerTests.SerializeDeserialize
    2018-07-23T19:17:32.3986784Z Passed   SpatialScene.ConfigurationModule.Tests.OnlineFileTests.GetDataTest
    2018-07-23T19:17:32.3987033Z Passed   SpatialScene.ConfigurationModule.Tests.OnlineFileTests.GetModifiedTest
    2018-07-23T19:17:32.8003857Z Results File: C:\agent_spatial\_work\5\s\TestResults\Mattd_WIN-K39CPC8OL32 2018-07-23 14_17_28.trx
    2018-07-23T19:17:32.8040030Z
    2018-07-23T19:17:32.8042090Z Total tests: 9. Passed: 9. Failed: 0. Skipped: 0.
    2018-07-23T19:17:32.8044679Z Test Run Failed.
    2018-07-23T19:17:32.8106782Z Test execution time: 31.2828 Seconds
    2018-07-23T19:17:33.5532294Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
    2018-07-23T19:17:33.7229590Z ##[error]Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe failed with return code: 1
    2018-07-23T19:17:34.4154075Z ##[error]VsTest task failed.
    2018-07-23T19:17:34.4255342Z Publishing test results to test run '822'
    2018-07-23T19:17:34.4255812Z Test results remaining: 9. Test run id: 822
    2018-07-23T19:17:34.6597963Z ##[section]Async Command Start: Publish test results
    2018-07-23T19:17:35.0784321Z Published Test Run : https://911datamaster.visualstudio.com/Spatial/_TestManagement/Runs#runId=822&_a=runCharts
    2018-07-23T19:17:35.0785102Z ##[section]Async Command End: Publish test results
    2018-07-23T19:17:35.0786969Z ##[section]Finishing: JustMock VSTest - testAssemblies
  6. Mihail
    Admin
    Mihail avatar
    253 posts

    Posted 26 Jul 2018 Link to this post

     Hello,

    I am afraid that I couldn't manage to reproduce the problem with the latest version. However, when examining the code I found a place wherein theory such issue can potentially occur.
    Could you open a support ticket with a simple solution illustrating the problem? This way I would be able to examine the problem in depth.

    Regards,
    Mihail
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top