Community
Participate
Working Groups
Provide better error handling when datapools cannot be loaded at runtime. When datapools cannot be loaded at runtime (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=195683), the following error is thrown: org.eclipse.hyades.execution.runtime.datapool.DatapoolException: IWAT3056E Datapool could not be loaded from file C:\workspaces\rsx7.5-workspaces\mastering-tdd-m2-start\UniversitySystem\junit\ScoreGradePool.datapool at org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.loadForEdit(Common_DatapoolFactoryImpl.java:308) at org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl.load(Common_DatapoolFactoryImpl.java:435) at com.ibm.rational.tddworkshop.CourseTest.getLetterGradeReturnsCorrectLetter(CourseTest.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) However, this error does not identify the root cause of the failure. We need some new error messages for the various error conditions when loading a datapool at runtime (see try block of Common_DatapoolFactoryImpl.loadForEdit(Common_DatapoolFactoryImpl.java:308)) This defect must be deferred to TPTP 4.5.3 since it requires translation.
This defect require new test cases (e.g. JUnit) to handle the various error conditions.
Approved for the TPTP 4.5.3 defect plan (see PMC minutes from 02/25/09).
In addition, we will need to include the caught exception as the cause of the org.eclipse.hyades.execution.runtime.datapool.DatapoolException.
Created attachment 127513 [details] Patch.
Updated the error handling in /org.eclipse.tptp.platform.models/src-test/org/eclipse/hyades/models/common/datapool/impl/Common_DatapoolFactoryImpl.java, including new error messages for error conditions not previously handled and adding a cause to all thrown org.eclipse.hyades.execution.runtime.datapool.DatapoolExceptions. Added 8 new test cases to /org.eclipse.hyades.test.ui.datapool.tests/junit_plugin/datapool/Test.UI.Datapool_Running.testsuite. The attached patch checked in to CVS (HEAD).
Verified by running /org.eclipse.hyades.test.ui.datapool.tests/junit_plugin/datapool/Test.UI.Datapool_Running.testsuite. Using a TPTP-4.6.0-200903170100 build, the JUnit Plugin test passes.
(In reply to comment #6) > Verified by running > > /org.eclipse.hyades.test.ui.datapool.tests/junit_plugin/datapool/Test.UI.Datapool_Running.testsuite. > > Using a TPTP-4.6.0-200903170100 build, the JUnit Plugin test passes. > Closing.