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] Commented: (DERBY-1275) Provide a way to enable client tracing without changing the application
Date Thu, 01 Feb 2007 18:05:13 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469528
] 

Mamta A. Satoor commented on DERBY-1275:
----------------------------------------

I think I misunderstood your following comment on Jan 27th to the review package DERBY1275EnableClientTracingDiffV2.txt
"The test breaks the pattern for JUnit tests in a few ways: the suite method performs test
setup. The suite method is for providing a set of fixtures to run. Setup should be performed
in a test decorator for a set of fixtures or the setUp method for each fixture. "

I took the above comment to mean that Junit pattern discourages following setup code in the
suite() method
        Properties traceRelatedProperties = new Properties();
        traceRelatedProperties.setProperty("derby.client.traceLevel", "64");
        traceDirectory = "." + File.separator + "TraceDir"	+ File.separator;
        traceRelatedProperties.setProperty("derby.client.traceDirectory", traceDirectory);
        return new SystemPropertyTestSetup(suite, traceRelatedProperties);

Now, I think your comment was really for following piece of code in the suite() method and
not for the code related to SystemPropertyTestSetup fixture. 
+        File dir = new File( traceDirectory );
+        dir.mkdirs();

This is the only outstanding issue that I need to resolve on this Jira entry based on all
different comments. I have already moved the directory setup code in the setUp() method in
the .DERBY1275EnableClientTracingDiffV4.txt Next, I will remove systemPropertiesSetupDecorator
from TestConfiguration and have my junit test directly use the fixture SystemPropertyTestSetup.



> Provide a way to enable client tracing without changing the application
> -----------------------------------------------------------------------
>
>                 Key: DERBY-1275
>                 URL: https://issues.apache.org/jira/browse/DERBY-1275
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.1.3.1, 10.2.1.6
>            Reporter: Kathey Marsden
>         Assigned To: Mamta A. Satoor
>            Priority: Minor
>             Fix For: 10.2.3.0
>
>         Attachments: DERBY1275EnableClientTracingDiffV1.txt, DERBY1275EnableClientTracingDiffV2.txt,
DERBY1275EnableClientTracingDiffV3.txt, DERBY1275EnableClientTracingDiffV4.txt, DERBY1275EnableClientTracingStatV1.txt,
DERBY1275EnableClientTracingStatV2.txt, DERBY1275EnableClientTracingStatV3.txt, DERBY1275EnableClientTracingStatV4.txt
>
>
> Currently  the client tracing can be enabled by  setting attributes on the client url,
setXXX methods on the DataSource or calling DriverManager.setLogWriter(), but it often cannot
be enabled in a deployed client application  because all of these API's require modification
of the application or its configuration files.
> It would be good to have a global way to turn on client tracing.  A system property pointing
to a property file is  one possibility but probably not ideal because of the impact in class
loader contexts.    I am not sure what the other possiblities are,

-- 
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