DUnitX icon indicating copy to clipboard operation
DUnitX copied to clipboard

Recompling tests in Delphi 11.2 causes IO 105 errors

Open markhumphreysjhc opened this issue 2 years ago • 3 comments

Taking existing tests and simply recompiling them use Delphi 11.2 causes I/O Error 105 errors.

It looks like no matter what the tests are compiled with, the WindowsConloseWriter sets Self.RedirectedStdOut to be true.

Even if the actual console logger is not set, then the final call to System.Write in the project - System.Write('Done.. press <Enter> key to quit.'); still causes the exception.

It looks like the call to GetConsoleMode always returns false, setting the RedirectedStdout flag.

It might be something in the tests that is causing this, but I don't understand why it works in 10.2 and not in 11.2

markhumphreysjhc avatar Nov 24 '22 09:11 markhumphreysjhc

I'm not able to reproduce this here. Try recreating the project and copying the existing units in, perhaps something got messed up during the upgrade process.

vincentparrett avatar Nov 24 '22 11:11 vincentparrett

I had this way back when I used the console.

At development I have been using TestInsight, so have not tested the console.

It somehow can't allocate a console always. I have a feeling that there were some fixes to this. But not sure though. Vaguely remember it might have been a problem of tested code, to interfere with console creation somehow. I'll try to dig up more info...

On Thu, Nov 24, 2022 at 11:23 AM Mark Humphreys @.***> wrote:

Taking existing tests and simply recompiling them use Delphi 11.2 causes I/O Error 105 errors.

It looks like no matter what the tests are compiled with, the WindowsConloseWriter sets Self.RedirectedStdOut to be true.

Even if the actual console logger is not set, then the final call to System.Write in the project - System.Write('Done.. press <Enter> key to quit.'); still causes the exception.

It looks like the call to GetConsoleMode always returns false, setting the RedirectedStdout flag.

It might be something in the tests that is causing this, but I don't understand why it works in 10.2 and not in 11.2

— Reply to this email directly, view it on GitHub https://github.com/VSoftTechnologies/DUnitX/issues/324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7E2H243QPK44QSOPQT2D3WJ4X2FANCNFSM6AAAAAASKCMKVA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TommiPrami avatar Nov 24 '22 18:11 TommiPrami

I have noticed that occasionally it all works. I suspect that it is something in the code being tested, but I will have to start recreate the project one set of tests at a time.

markhumphreysjhc avatar Nov 25 '22 09:11 markhumphreysjhc