galasa-dev / projectmanagement

Project Management repo for Issues and ZenHub
7 stars 4 forks source link

Incorrect assignment to message when running a test. #2010

Closed adamcoulthard closed 1 month ago

adamcoulthard commented 1 month ago

Describe the bug

During a test run, an @ZOSProgram compile failed causing a provisioning failure to occur. Within the runlog we got:

30/09/2024 09:37:01.928 INFO  d.g.f.TestRunner - Provision Generate failed
dev.galasa.framework.TestRunException: Unable to inform managers of start of test class
    at dev.galasa.framework.TestClassWrapper.runTestMethods(TestClassWrapper.java:192) ~[-1727688515200:?]
    at dev.galasa.framework.TestRunner.runTestClassWrapper(TestRunner.java:402) ~[-1727688515200:?]
    at dev.galasa.framework.TestRunner.runEnvironment(TestRunner.java:376) ~[-1727688515200:?]
    at dev.galasa.framework.TestRunner.createEnvironment(TestRunner.java:340) ~[-1727688515200:?]
    at dev.galasa.framework.TestRunner.generateEnvironment(TestRunner.java:292) [-1727688515200:?]
    at dev.galasa.framework.TestRunner.runTest(TestRunner.java:212) [-1727688515200:?]
    at dev.galasa.framework.TestRunner.runTest(TestRunner.java:68) [-1727688515200:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
    at dev.galasa.boot.felix.FelixFramework.runTest(FelixFramework.java:248) [boot.jar:?]
    at dev.galasa.boot.Launcher.launch(Launcher.java:172) [boot.jar:?]
    at dev.galasa.boot.Launcher.main(Launcher.java:122) [boot.jar:?]
Caused by: dev.galasa.framework.spi.FrameworkException: Problem in start of test class for manager dev.galasa.zosprogram.internal.ZosProgramManagerImpl
    at dev.galasa.framework.TestRunManagers.startOfTestClass(TestRunManagers.java:535) ~[-1727688515200:?]
    at dev.galasa.framework.TestClassWrapper.runTestMethods(TestClassWrapper.java:190) ~[-1727688515200:?]
    ... 13 more
Caused by: dev.galasa.zosprogram.ZosProgramException: Compile job for C program PARENT8 for field "myprog14" failed: CC 0012. GALNKMDR(JOB53618)
    at dev.galasa.zosprogram.internal.AbstractZosProgramCompiler.submitCompileJob(AbstractZosProgramCompiler.java:92) ~[?:?]
    at dev.galasa.zosprogram.internal.AbstractZosProgramCompiler.compile(AbstractZosProgramCompiler.java:52) ~[?:?]
    at dev.galasa.zosprogram.internal.ZosProgramImpl.compile(ZosProgramImpl.java:185) ~[?:?]
    at dev.galasa.zosprogram.internal.ZosProgramManagerImpl.startOfTestClass(ZosProgramManagerImpl.java:190) ~[?:?]
    at dev.galasa.framework.TestRunManagers.startOfTestClass(TestRunManagers.java:532) ~[-1727688515200:?]
    at dev.galasa.framework.TestClassWrapper.runTestMethods(TestClassWrapper.java:190) ~[-1727688515200:?]
    ... 13 more

Note that the first message is marked as an INFO, this really should be ERROR.

Steps to reproduce

Create a test case that uses an @ZOSProgram to compile a program that fails to compile.

Expected behavior

Message should be ERROR rather than INFO.

techcobweb commented 1 month ago

Well spotted. Thankyou for the PR.