vipm-io / vi-tester

VI Tester for LabVIEW
BSD 3-Clause "New" or "Revised" License
28 stars 26 forks source link

Error 1000 can occur when calling setUp if setup is waiting on test completion and takes a while to fully complete after test/tearDown is called #51

Open jimkring opened 4 years ago

jimkring commented 4 years ago

In a testcase where the setUp.vi takes a long time to clean up and finish executing after the test method or tearDown.vi completes, sometimes it's still running and the call to setUp.vi for the next test method will fail with something like the following:

[code: 1000 source: Invoke Node in TestCase.lvclass:CallTestMethod.vi->TestCase.lvclass:run.vi->TestSuite.lvclass:run.vi->TestRunner.lvclass:run.vi->GraphicalTestRunner.lvlib:Load and Execute Tests Process__core.vi->GraphicalTestRunner.lvlib:Load and Execute Tests Process.vi->GraphicalTestRunner.lvlib:Dynamic Load and Execute Tests Process.vi->Graphical Test Runner - Main UI - .vi

Method Name: Run VI VI Path: My_TestCase\setUp.vi]

The solution is to wait for setUp to finish running inside of TestCase.lvclass:closeMethodViReference.vi, before we close it's reference.

image

jimkring commented 4 years ago

Here is the fixed VI, fixed off of v3.0.2.294 installed here:

vi.lib\addons_JKI Toolkits\VI Tester\TestCase.llb\closeMethodViReference.vi

closeMethodViReference.vi.zip