db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <mbo.t...@spree.de>
Subject Re: My first test run -- 'splain me this, Lucy
Date Fri, 23 Sep 2005 09:24:27 GMT
Hi Karan,

your analysis is correct. The problem is that class TestListSuite, the 
property "testlist" and the file JDOTCKTestCases.list are outdated. We 
do not need any of them anymore. I plan to cleanup this as part of 
fixing JDO-92 ("Remove support for GUI test runner"), but I haven't had 
the time to do so.

As you pointed out, the problem occurs if the property jdo.tck.classes 
is not defined. Then the test runner runs class TestListSuite which 
tries to get the list of test class names from JDOTCKTestCases.list.

Regards Michael

> Do we really need the system property "testlist"?
> 
> I guess i found the place where JDOTCKTestCases.list is specified as the
> default. It is specified in the file
> 
> test/java/org/apache/jdo/tck/util/TestListSuite.java:
> 
> public static final String TESTLIST_DEFAULT = "JDOTCKTestCases.list";
> 
> If you look at the error, looks like it is trying to find a system property
> "testlist" and if that property is not specified, then its default value is
> JDOTCKTestCases.list.
> 
> if you look at the catch block of the method getTestClassNames, it prints
> out the error which Matthew got:
> 
> Problems reading testlist JDOTCKTestCases.list:
> java.io.FileNotFoundException: JDOTCKTestCases.list (No such file or
> directory)
> 
> protected List getTestClassNames() {
> // get the name of the testlist file as system property
> String testlist = System.getProperty(TESTLIST_PROPERTY, TESTLIST_DEFAULT);
> List testClassNames = new ArrayList();
> try {
> BufferedReader reader = getTestListReader(testlist);
> for (String line = reader.readLine();
> line != null;
> line = reader.readLine()) {
> line = line.trim();
> if (isTestClassName(line)) {
> testClassNames.add(line);
> }
> }
> reader.close();
> }
> catch (IOException ex) {
> System.out.println("Problems reading testlist " + testlist + ": " + ex);
> }
> return testClassNames;
> }
> 
> I added a ex.printStackTrace() to the catch block and got the following
> output:
> 
> doRuntck.jdori:
> [java] Problems reading testlist JDOTCKTestCases.list:
> java.io.FileNotFoundException: JDOTCKTestCases.list (No such file or
> directory)
> [java] java.io.FileNotFoundException: JDOTCKTestCases.list (No such file or
> directory)
> [java] at java.io.FileInputStream.open(Native Method)
> [java] at java.io.FileInputStream.<init>(FileInputStream.java:106)
> [java] at java.io.FileInputStream.<init>(FileInputStream.java:66)
> [java] at java.io.FileReader.<init>(FileReader.java:41)
> [java] at org.apache.jdo.tck.util.TestListSuite$1.run(TestListSuite.java
> :149)
> [java] at java.security.AccessController.doPrivileged(Native Method)
> [java] at org.apache.jdo.tck.util.TestListSuite.getTestListReader(
> TestListSuite.java:146)
> [java] at org.apache.jdo.tck.util.TestListSuite.getTestClassNames(
> TestListSuite.java:124)
> [java] at org.apache.jdo.tck.util.TestListSuite.<init>(TestListSuite.java
> :66)
> [java] at org.apache.jdo.tck.util.TestListSuite.suite(TestListSuite.java:85)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:324)
> [java] at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:111)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java
> :107)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java
> :93)
> [java] Description: Test Stuff
> [java] Time: 000
> [java] derby-app-mytest-junit.txt:
> [java] OK Tests run: 000, Time: 000 seconds.
> [java] Excluded tests: [org.apache.jdo.tck.enhancement.FieldAccessModified,
> org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable]
> [echo] Finished run with database="derby" identitytype="applicationidentity"
> mapping="".
> 
> [echo]
> 
> result:
> [java] Result: All (1) configurations passed.
> [java] See file
> '/home/karan/Projects/jdolatest/jdo/trunk/tck20/target/logs/20050922-234348/TCK-
> results.txt' for details.
> 
> 
> 
> 
> On 9/22/05, Karan Malhi <karan.malhi@gmail.com> wrote:
> 
>>I was able to reproduce the error (not fully though), just the part where
>>it looks for JDOTCKTestCases.list. Below is the error(partial output)
>>Problems reading testlist JDOTCKTestCases.list:
>>java.io.FileNotFoundException: JDOTCKTestCases.list (No such file or
>>directory)
>>
>>This is caused if you do not specify the property jdo.tck.classes=<nameofclass>
>>in the detach.conf file.
>>
>>I looked at maven.xml but couldnt find the place where it sets this
>>property to a default of JDOTCKTestCases.list
>>
>>On 9/22/05, Craig Russell < Craig.Russell@sun.com> wrote:
>>
>>>Here's what I use for my conf file:
>>>[d-usca14-133-145:jdo/trunk/tck20] clr% cat test/conf/clr.conf
>>>jdo.tck.description = Test Stuff
>>>
>>>jdo.tck.mapping.companyfactory=org.apache.jdo.tck.pc.company.CompanyFactoryPersistentInterface
>>>jdo.tck.classes =
>>>org.apache.jdo.tck.transactions.GetRollbackOnlyReturnsFalseUntilSet
>>>jdo.tck.testdata =
>>>org/apache/jdo/tck/pc/company/companyNoRelationships.xml
>>>jdo.tck.mapping = 0
>>>
>>>Does this help?
>>>
>>>Craig
>>>
>>>On Sep 22, 2005, at 7:00 PM, Craig Russell wrote:
>>>
>>>Hi Matthew,
>>>What's the content of test/conf/detach.list?
>>>
>>>Craig
>>>
>>>On Sep 22, 2005, at 6:37 PM, Matthew T. Adams wrote:
>>>
>>>Hi all,
>>>
>>>I'm trying to run my first test, and I'm getting some results that I
>>>understand, and some results that I don't. Attached are the logs
>>>produced,
>>>as well as the test class & config files.
>>>
>>>What I don't quite get is this console output:
>>>doRuntck.jdori:
>>>[java] Problems reading testlist JDOTCKTestCases.list:
>>>java.io.FileNotFoundException: JDOTCKTestCases.list (The system cannot
>>>find
>>>the file specified)
>>>[java] Description:
>>>[java] Time: 000
>>> [java] derby-app-detach-junit.txt:
>>>[java] OK Tests run: 000, Time: 000 seconds.
>>>[java] Excluded tests:
>>>[org.apache.jdo.tck.enhancement.FieldAccessModified,
>>>org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable]
>>> [echo] Finished run with database="derby"
>>>identitytype="applicationidentity" mapping="".
>>>
>>>I didn't expect JDOTCKTestCases.list to be searched for at all, since I
>>>specified "maven -Djdo.tck.cfglist=detach.list runtck.jdori" at the
>>>command
>>>line. I would expect 2 of 2 cofigurations to fail (appid & dsid), since
>>>JPOX doesn't yet implement the PMF & PM property detachAllOnCommit.
>>>Instead, the message I get is that 1 of 2 configurations failed.
>>>
>>>What gives? Any ideas?
>>>
>>>--matthew
>>>
>>>Matthew T. Adams
>>>Corporate Technical Advisor & Senior Consultant
>>>Mobile: +1 253 732 1051
>>>Phone: +1 206 331 3833
>>>Fax: +1 815 331 0952
>>>matthew.adams@xcalia.com
>>>P.O. Box 24163
>>>Federal Way, WA 98093
>>>www.xcalia.com <http://www.xcalia.com>
>>>
>>>
>>>
>>>Xcalia makes implementing SOA easy with agile business intermediation
>>>software that combines heterogeneous data with services to easily
>>>develop
>>>and deploy transactional composite applications. Enterprises can quickly
>>>
>>>respond to changing business requirements and dramatically reduce the
>>>costs
>>>of data access and service integration.
>>>
>>><derby-dsid-detach-junit.txt >
>>><derby-dsid-detach-tck.txt>
>>><TCK-results.txt>
>>><derby-app-detach-junit.txt>
>>><derby-dsid-detach-jpox.txt>
>>>
>>>
>>>Craig Russell
>>>Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>>>408 276-5638 mailto:Craig.Russell@sun.com <Craig.Russell@sun.com>
>>>P.S. A good JDO? O, Gasp!
>>>
>>>
>>> Craig Russell
>>>
>>>Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>>>
>>>408 276-5638 mailto:Craig.Russell@sun.com <Craig.Russell@sun.com>
>>>
>>>P.S. A good JDO? O, Gasp!
>>>
>>>
>>>
>>
>>
>>--
>>Karan Malhi
>>
> 
> 
> 
> 
> --
> Karan Malhi
> 


-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			

Mime
View raw message