Closed mpepa closed 10 months ago
Hi Mirko,
Good catch! We don't deploy the same library files that we test and I suspect we omit the delete step to save a bit of disk I/O during the TAP run.
I'm good for us to change this to always delete the class, even from a CLI run.
What Omnis version are you running? I can make the change in that version and later.
Alex
On Nov 28, 2023, at 12:10, mpepa @.***> wrote:
Hello Alex
I noted, that when I use a mock on a class, there is a class 'Oblabla_TestMock' created, which remains in the library if I run the TAP-tests from omniscli. I found the code in omnistap.ogTAPManager.$_teardownMocks.Line15 which does in effect not delete the mock-classes, if the tests run from omniscli. Why? What is the reason, that You do not want to delete these classes in theses circumstances? Do You just want to save some time? Background for my question: In our workflow, we use the exact same libraries, that are tested for deployment. So the 'xxxmock'-classes are a little bit disturbing.
Thank You again for the great framework. Mirko
— Reply to this email directly, view it on GitHub https://github.com/suransys/omnistap/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLTLF424WX2USDKWEM77NLYGYLIZAVCNFSM6AAAAAA76DDYW6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTIOJRGU2DCMI. You are receiving this because you are subscribed to this thread.
Hi Alex
Thank You! That would be fine. We currently use Omnis 10.
Have a nice day
Mirko
Hi Marko,
Sorry for the delay. Just pushed a change to remove that CLI condition. Mock classes will always be removed now after running a test.
Alex
Hi Alex Thank You for the push. I tried to test it, but it looks, as if the library in the 10.2 folder might be a 10.22-latest-library. At least I cannot open it with 10.22 31664. Mirko
Hi Mirko,
Yes, I updated to the latest 10.22 at EurOmnis right after it came out.
Do you want to try just applying the code change to your copy and see if that fixes it? The only change was to remove the condition about not running in CLI from ogTAPManager.$_teardownMocks: https://github.com/suransys/omnistap/commit/c13643c964e85dc668b21f886e2509bc32c5abc6
Alex
On Dec 17, 2023, at 11:10, mpepa @.***> wrote:
Hi Alex Thank You for the push. I tried to test it, but it looks, as if the library in the 10.2 folder might be a 10.22-latest-library. At least I cannot open it with 10.22 31664. Mirko
— Reply to this email directly, view it on GitHub https://github.com/suransys/omnistap/issues/22#issuecomment-1859212459, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLTLFZ2DLGB5224BYPOQQDYJ4KPLAVCNFSM6AAAAAA76DDYW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGIYTENBVHE. You are receiving this because you modified the open/close state.
Hi Alex
Ah, ok. No Problem, yes I will apply that change to my 10.2 Code.
Mirko
Hello Alex
I noted, that when I use a mock on a class, there is a class 'Oblabla_TestMock' created, which remains in the library if I run the TAP-tests from omniscli. I found the code in omnistap.ogTAPManager.$_teardownMocks.Line15 which does in effect not delete the mock-classes, if the tests run from omniscli. Why? What is the reason, that You do not want to delete these classes in theses circumstances? Do You just want to save some time? Background for my question: In our workflow, we use the exact same libraries, that are tested for deployment. So the 'xxxmock'-classes are a little bit disturbing.
Thank You again for the great framework. Mirko