db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-2396) conn/DefaultLocale.java test relies on internal Derby api to determine the database's territory
Date Sat, 03 Mar 2007 08:13:51 GMT
conn/DefaultLocale.java test relies on internal Derby api to determine the database's territory
-----------------------------------------------------------------------------------------------

                 Key: DERBY-2396
                 URL: https://issues.apache.org/jira/browse/DERBY-2396
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.3.0.0
            Reporter: Mamta A. Satoor


I think Derby's testing philosphy is that the tests should be using the apis that are available
to an end user ie JDBC api. conn/DefaultLocale.java doesn't follow this rule. It has a method
called checkDatabaseLocale which uses following internal api to determine the database's territory.
org.apache.derby.iapi.db.Factory.getDatabaseOfConnection().getLocale().toString();

The tests i18n/urlLocale and i18n/messageLocale rely on conn/DefaultLocale's checkDatabaseLocale
implementation.

Derby provides SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY function to determine the value of a
property. For instance, if I create a database with attribute logDevice=c:/dellater1 then
I can later find the location of database's logDevice by following statement
VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')

But for some reason, I can't use the same for the territory attribute.
I tried
VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('territory')
but it returned null.

I tried referencing the territory attribute by it's name in services.properties and that didn't
work either
VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.serviceLocale")

So, I guess there are 2 steps involved
1)Why isn't there a way to find the value of the territory attribute?
2)Once we know the answer to 1) and possibly fix it, then change the conn/DefaultLocale.java
test to use the documented way of getting the territory rather than internal Derby api.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message