Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 257127 - Provide better error handling when datapools cannot be loaded at runtime.
Summary: Provide better error handling when datapools cannot be loaded at runtime.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-01 15:20 EST by Paul Slauenwhite CLA
Modified: 2016-05-05 10:29 EDT (History)
2 users (show)

See Also:


Attachments
Patch. (25.34 KB, patch)
2009-03-04 12:52 EST, Paul Slauenwhite CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slauenwhite CLA 2008-12-01 15:20:22 EST
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.
Comment 1 Paul Slauenwhite CLA 2008-12-02 11:54:11 EST
This defect require new test cases (e.g. JUnit) to handle the various error conditions.
Comment 2 Paul Slauenwhite CLA 2009-02-25 10:58:59 EST
Approved for the TPTP 4.5.3 defect plan (see PMC minutes from 02/25/09).
Comment 3 Paul Slauenwhite CLA 2009-03-04 09:49:15 EST
In addition, we will need to include the caught exception as the cause of the org.eclipse.hyades.execution.runtime.datapool.DatapoolException.
Comment 4 Paul Slauenwhite CLA 2009-03-04 12:52:38 EST
Created attachment 127513 [details]
Patch.
Comment 5 Paul Slauenwhite CLA 2009-03-04 12:52:54 EST
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).
Comment 6 Ben Chen CLA 2009-03-17 16:31:57 EDT
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.
Comment 7 Paul Slauenwhite CLA 2009-03-17 19:35:06 EDT
(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.