db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-1458) Add MessageBundleTest to build script to verify that there are no orphaned message ids
Date Tue, 14 Oct 2008 22:05:44 GMT

     [ https://issues.apache.org/jira/browse/DERBY-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Myrna van Lunteren updated DERBY-1458:
--------------------------------------

    Attachment: DERBY-1458.diff

Attaching a patch that adds a target, runmessagechecktest, to the top level build.xml. The
'all' target depends on it, and it runs MessageBundleTest through target junit-single.

When there are no missing/orphaned messages, this adds the following output to any 'all' build
(after the pptesting-build/junit-init and before the final closing 'all:'
-------------------
runmessagechecktest:

junit-init:

junit-single:
    [junit] Running org.apache.derbyTesting.functionTests.tests.i18n.MessageBundleTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.188 sec
-------------------

When you remove an SQLState without clobbering (clobber & rebuild would show more compilation
errors)  it'll do something like this (but still give BUILD SUCCESSFUL)

-------------------
runmessagechecktest:

junit-init:

junit-single:
    [junit] Running org.apache.derbyTesting.functionTests.tests.i18n.MessageBundleTest
    [junit] WARNING: Message id XCL30.S in messages_en.properties is not referenced in either
SQLState.java or MessageId.java
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.172 sec
-------------------

If you remove a message from messages.xml you'll get this:

-------------------
runmessagechecktest:

junit-init:

junit-single:
    [junit] Running org.apache.derbyTesting.functionTests.tests.i18n.MessageBundleTest
    [junit] ERROR: Message id XCL30.S in SQLState.java was not found in messages_en.properties
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.219 sec
-------------------

I think this good enough.
I intend to commit this.

> Add MessageBundleTest to build script to verify that there are no orphaned message ids
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-1458
>                 URL: https://issues.apache.org/jira/browse/DERBY-1458
>             Project: Derby
>          Issue Type: Test
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: David Van Couvering
>         Attachments: DERBY-1458.diff
>
>
> MessageBundleTest can't be run with the regular tests because it relies on SQLState.java
and MessageId.java, which are not in the jar files.  But it actually makes more sense to run
it as part of the build, as we are verifying the consistency of code references.  

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