Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Switch to another DB backend when doing CDO tests
[CDO] Switch to another DB backend when doing CDO tests [message #480368] Sun, 16 August 2009 09:15 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Hello again.

When running
org.eclipse.emf.cdo.tests.db.DBAnnotationTest
from my newly setup CDO Source Workspace it fails because the MemStore
is automatically used (where some annotations don't make any sense).
How do I switch to using H2 instead? Is there a configuration file?
Where is it?

Regards,
Kai
Re: [CDO] Switch to another DB backend when doing CDO tests [message #480532 is a reply to message #480368] Mon, 17 August 2009 14:37 Go to previous messageGo to next message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
Kai,

Kai Schlamp schrieb:
> When running
> org.eclipse.emf.cdo.tests.db.DBAnnotationTest
> from my newly setup CDO Source Workspace it fails because the MemStore
> is automatically used (where some annotations don't make any sense).
> How do I switch to using H2 instead? Is there a configuration file?
> Where is it?
Which launch configuration are you using?

You should use this one: CDO AllTests (H2).launch which is contained in
the org.eclipse.emf.cdo.tests.db project.

Cheers,
Stefan
Re: [CDO] Switch to another DB backend when doing CDO tests [message #480564 is a reply to message #480532] Mon, 17 August 2009 15:59 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Stefan Winkler wrote:
> Kai,
>
> Kai Schlamp schrieb:
>> When running
>> org.eclipse.emf.cdo.tests.db.DBAnnotationTest
>> from my newly setup CDO Source Workspace it fails because the MemStore
>> is automatically used (where some annotations don't make any sense).
>> How do I switch to using H2 instead? Is there a configuration file?
>> Where is it?
> Which launch configuration are you using?
>
> You should use this one: CDO AllTests (H2).launch which is contained in
> the org.eclipse.emf.cdo.tests.db project.

Thanks Stefan. But is there a way to run a specific test with H2 or
whatever? Before I re-setup my workspace I just right clicked the test
file and chose Run JUnit test. H2 was somehow preset.

Regards,
Kai
Re: [CDO] Switch to another DB backend when doing CDO tests [message #480565 is a reply to message #480564] Mon, 17 August 2009 16:02 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Never mind I just found a way to re-run a specific test from the JUnit
GUI somehow.

Kai Schlamp wrote:
> Stefan Winkler wrote:
>> Kai,
>>
>> Kai Schlamp schrieb:
>>> When running
>>> org.eclipse.emf.cdo.tests.db.DBAnnotationTest
>>> from my newly setup CDO Source Workspace it fails because the MemStore
>>> is automatically used (where some annotations don't make any sense).
>>> How do I switch to using H2 instead? Is there a configuration file?
>>> Where is it?
>> Which launch configuration are you using?
>>
>> You should use this one: CDO AllTests (H2).launch which is contained in
>> the org.eclipse.emf.cdo.tests.db project.
>
> Thanks Stefan. But is there a way to run a specific test with H2 or
> whatever? Before I re-setup my workspace I just right clicked the test
> file and chose Run JUnit test. H2 was somehow preset.
>
> Regards,
> Kai
Re: [CDO] Switch to another DB backend when doing CDO tests [message #480670 is a reply to message #480565] Tue, 18 August 2009 07:53 Go to previous messageGo to next message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
Kai,

I don't know if there's an "official" way. Yes you can rerun a single
test from an already run AllTests log.
My own workaround is usually to temporarily override initTestClasses()
in AllTestsDbH2 and only adding the test case(s) I want to run without
calling super.
However, one must not forget to delete the initTestClasses again before
committing ;)

Cheers,
Stefan


Kai Schlamp schrieb:
> Never mind I just found a way to re-run a specific test from the JUnit
> GUI somehow.
>
> Kai Schlamp wrote:
>> Stefan Winkler wrote:
>>> Kai,
>>>
>>> Kai Schlamp schrieb:
>>>> When running
>>>> org.eclipse.emf.cdo.tests.db.DBAnnotationTest
>>>> from my newly setup CDO Source Workspace it fails because the MemStore
>>>> is automatically used (where some annotations don't make any sense).
>>>> How do I switch to using H2 instead? Is there a configuration file?
>>>> Where is it?
>>> Which launch configuration are you using?
>>>
>>> You should use this one: CDO AllTests (H2).launch which is contained in
>>> the org.eclipse.emf.cdo.tests.db project.
>>
>> Thanks Stefan. But is there a way to run a specific test with H2 or
>> whatever? Before I re-setup my workspace I just right clicked the
>> test file and chose Run JUnit test. H2 was somehow preset.
>>
>> Regards,
>> Kai
Re: [CDO] Switch to another DB backend when doing CDO tests [message #480708 is a reply to message #480670] Tue, 18 August 2009 09:48 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Guys,

The test configuration(s) is usually setup by the test suite, together
with the set of test classes. The test configurations are stored on the
file system and read/used if a test run does not explicitely setup a
configuration. Once you've properly started the right suite, you should
be able to repeat single tests with the same configuration.

It's a bit complicated but due to restrictions / design flaws of JUnit
the best we can achieve.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Stefan Winkler schrieb:
> Kai,
>
> I don't know if there's an "official" way. Yes you can rerun a single
> test from an already run AllTests log.
> My own workaround is usually to temporarily override initTestClasses()
> in AllTestsDbH2 and only adding the test case(s) I want to run without
> calling super.
> However, one must not forget to delete the initTestClasses again before
> committing ;)
>
> Cheers,
> Stefan
>
>
> Kai Schlamp schrieb:
>
>> Never mind I just found a way to re-run a specific test from the JUnit
>> GUI somehow.
>>
>> Kai Schlamp wrote:
>>
>>> Stefan Winkler wrote:
>>>
>>>> Kai,
>>>>
>>>> Kai Schlamp schrieb:
>>>>
>>>>> When running
>>>>> org.eclipse.emf.cdo.tests.db.DBAnnotationTest
>>>>> from my newly setup CDO Source Workspace it fails because the MemStore
>>>>> is automatically used (where some annotations don't make any sense).
>>>>> How do I switch to using H2 instead? Is there a configuration file?
>>>>> Where is it?
>>>>>
>>>> Which launch configuration are you using?
>>>>
>>>> You should use this one: CDO AllTests (H2).launch which is contained in
>>>> the org.eclipse.emf.cdo.tests.db project.
>>>>
>>> Thanks Stefan. But is there a way to run a specific test with H2 or
>>> whatever? Before I re-setup my workspace I just right clicked the
>>> test file and chose Run JUnit test. H2 was somehow preset.
>>>
>>> Regards,
>>> Kai
>>>


Previous Topic:[CDO] Problem with Getting started with CDO
Next Topic:ECrossReferenceAdapter vs "emf recipes" wiki's CrossDocumentContentAdapter
Goto Forum:
  


Current Time: Fri Mar 29 15:35:43 GMT 2024

Powered by FUDForum. Page generated in 0.03370 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top