[vwnc] [Glorp] Loading Glorp and running GlorpTests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] [Glorp] Loading Glorp and running GlorpTests

Leandro Perez-2
Hello list,

I've just installed VWnc 7.6 and loaded the last version of Glorp (7.7 - 21 + AR55217 1, dwallen). I had a couple of issues both loading it and using it, so I thought it would be good to let you people know :)

This warning appeared while loading the GlorpTest bundle (this also occurs using vw7.5):

Warning: Package "GlorpMigrationTests" cannot be loaded.

The following classes cannot be loaded because their superclasses are neither in the image nor in the package being loaded:
    ActiveRecordMigrationTest (subclass of Root.Smalltalk.SUnit.TestCase)
    MigrationTest (subclass of Root.Smalltalk.SUnit.TestCase)

The problem is: The SUnit bundle and classes are not in the Root.Smalltalk namespace, they are in the XProgramming namespace.

Any ideas?

The second problem came out when I tried to run the GlorpTests.
Firstly defined the proper login information in the defaultPostgreSQLLocalLogin as:
    (Login new)
        database: PostgreSQLPlatform new;
        username: 'username';
        password: 'password';
        connectString: 'localhost:5432_glorp_test'.

and executed: DefaultLogin := self defaultPostgreSQLLocalLogin, so glorp knows where my database is. So far so good. I though I was ready to run the tests, but, while running them, this unhandledException was thrown:

UnhandledException: Message not understood: #setLogin:

PostgreSQLEXDIConnection(Object)>>doesNotUnderstand: #setLogin:

Glorp.VWDatabaseAccessor>>loginIfError: aBlock
    self log: 'Login'.
    (connection := self connectionClass new)
        setLogin: currentLogin. "****----HERE IT BREAKS----****"
    self execute: [connection connect] ifError: aBlock.
    self log: 'Login finished'

While currentLogin contains my login information. #setLogin: isn't defined in PostgreSQLEXDIConnection or in any of its superclasses.

Trying to fix it, I defined #setLogin: as follows:

ExternalDatabaseConnection>>setLogin:aLogin
    
    self username: aLogin username.
    self password: aLogin password.
    self environment: aLogin connectString

and it worked alright. The tests are running now and most of them pass, except the ones from the GlorpActiveRecordTests package, but that's another thing...

Well, that's it, best regards.

Leandro


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [Glorp] Loading Glorp and running GlorpTests

Alan Knight-2
At 01:31 PM 9/29/2008, Leandro Perez wrote:
The problem is: The SUnit bundle and classes are not in the Root.Smalltalk namespace, they are in the XProgramming namespace.

Someone created some tests as SUnitToo tests. The Glorp tests normally are plain SUnit, but SUnitToo is fairly commonly used within the development group, and we typically have some code loaded that makes them run compatibly (SUnit-Bridge2SU2). Assessments will also apparently do that. But if you don't have such things, it's a bit of a pain. We should get those tests changed back to generic SUnit.

In general, you probably want to avoid versions with "+ AR #####" in their names. Those will be branches associated with work in progress code.

and executed: DefaultLogin := self defaultPostgreSQLLocalLogin, so glorp knows where my database is. So far so good. I though I was ready to run the tests, but, while running them, this unhandledException was thrown:

UnhandledException: Message not understood: #setLogin:

Yes, that's exactly the sort of thing you might get. You might also get code dependent on VW 7.7 in general, but we'll try and avoid that. Your workaround is fine.


--
Alan Knight [|], Engineering Manager, Cincom Smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] [Glorp] Loading Glorp and running GlorpTests

Leandro Perez-2
In reply to this post by Leandro Perez-2
Hi,

The problem is: The SUnit bundle and classes are not in the Root.Smalltalk namespace, they are in the XProgramming namespace.

Someone created some tests as SUnitToo tests. The Glorp tests normally are plain SUnit, but SUnitToo is fairly commonly used within the development group, and we typically have some code loaded that makes them run compatibly (SUnit-Bridge2SU2). Assessments will also apparently do that. But if you don't have such things, it's a bit of a pain. We should get those tests changed back to generic SUnit.

In general, you probably want to avoid versions with "+ AR #####" in their names. Those will be branches associated with work in progress code.
 
Ok, it's good to know that !
I'll try to load SUnitToo first to see what happens


and executed: DefaultLogin := self defaultPostgreSQLLocalLogin, so glorp knows where my database is. So far so good. I though I was ready to run the tests, but, while running them, this unhandledException was thrown:

UnhandledException: Message not understood: #setLogin:

Yes, that's exactly the sort of thing you might get. You might also get code dependent on VW 7.7 in general, but we'll try and avoid that. Your workaround is fine.


Alright, thanks!

Greetings
Leandro


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc