# Problem building/testing 1.9.x branch: failing tests

**URL:** <https://forum.liquibase.org/t/problem-building-testing-1-9-x-branch-failing-tests/1341>\
**Category:** Liquibase Development\
**Created:** [July 8, 2009, 5:26pm UTC](https://forum.liquibase.org/t/problem-building-testing-1-9-x-branch-failing-tests/1341 "2009-07-08T17:26:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shoover\_lb](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shoover\_lb](https://forum.liquibase.org/u/shoover_lb)\
**Post date:** [July 8, 2009, 5:26pm UTC](https://forum.liquibase.org/t/problem-building-testing-1-9-x-branch-failing-tests/1341/1 "2009-07-08T17:26:00Z")

</div>

Hi,

I have been using Liquibase for about a year now, but this is the first time I’ve tried to build it.&nbsp; I am also new to svn, so that doesn’t help.&nbsp; I am a fairly old hand at ant and java.

I’m building and running tests, and I’m encountering some failures and errors.

I grabbed what I think is the 1.9.x branch using this command:  
&nbsp; &nbsp; svn co [http://liquibase.jira.com/svn/CORE/branches/1\_9](http://liquibase.jira.com/svn/CORE/branches/1_9) liquibase\_BR\_1\_9

Then I navigated into the liquibase\_BR\_1\_9/core/src&nbsp; directory and built using this command:  
&nbsp; &nbsp; ant

Then I built and ran the tests using this command:  
&nbsp; &nbsp; ant test

With the results that I got 1 failure and 7 errors.

liquibase.LiquibaseTest failed with

junit.framework.AssertionFailedError: expected:\<14\> but was:\<15\>  
at liquibase.LiquibaseTest.getImplementedDatabases(LiquibaseTest.java:76)
.&nbsp; I looked at the code, and DatabaseFactory is creating 15 Databases, but the LiquibaseTest is asserting against 14.

liquibase.change.AddColumnChangeTest is erroring out in the sybaseNull, sybaseNotNull, and sybaseConstraintsNull tests.

&nbsp; &nbsp; [junit] Testcase: sybaseNull(liquibase.change.AddColumnChangeTest): Caused an ERROR &nbsp; &nbsp; [junit] null expected:\<...TER TABLE [TAB] ADD [NEWCOL] TYP NULL\> but was:\<...TER TABLE [TAB] ADD [[NEWCOL]] TYP NULL\> &nbsp; &nbsp; [junit]&nbsp; &nbsp; at liquibase.change.AddColumnChangeTest.sybaseNull(AddColumnChangeTest.java:218) &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] Testcase: sybaseNotNull(liquibase.change.AddColumnChangeTest):&nbsp; &nbsp; &nbsp; Caused an ERROR &nbsp; &nbsp; [junit] null expected:\<...TER TABLE [TAB] ADD [NEWCOL] TYP NOT NULL\> but was:\<...TER TABLE [TAB] ADD [[NEWCOL]] TYP NOT NULL\> &nbsp; &nbsp; [junit]&nbsp; &nbsp; at liquibase.change.AddColumnChangeTest.sybaseNotNull(AddColumnChangeTest.java:237) &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] Testcase: sybaseConstraintsNull(liquibase.change.AddColumnChangeTest):&nbsp; &nbsp; &nbsp; Caused an ERROR &nbsp; &nbsp; [junit] null expected:\<...TER TABLE [TAB] ADD [NEWCOL] TYP NULL\> but was:\<...TER TABLE [TAB] ADD [[NEWCOL]] TYP NULL\> &nbsp; &nbsp; [junit]&nbsp; &nbsp; at liquibase.change.AddColumnChangeTest.sybaseConstraintsNull(AddColumnChangeTest.java:257)

liquibase.change.ModifyColumnChangeTest is erroring out in the generateStatement and generateFullStatementForMysql tests.

&nbsp; &nbsp; [junit] Testcase: generateStatement(liquibase.change.ModifyColumnChangeTest):&nbsp; &nbsp; &nbsp; Caused an ERROR &nbsp; &nbsp; [junit] null expected:\<...\_NAME MODIFY ( NAME [integer](3) )\> but was:\<...\_NAME MODIFY ( NAME [INT](3) )\> &nbsp; &nbsp; [junit]&nbsp; &nbsp; at liquibase.change.ModifyColumnChangeTest.generateStatement(ModifyColumnChangeTest.java:44) &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] Testcase: generateFullStatementForMysql(liquibase.change.ModifyColumnChangeTest):&nbsp; Caused an ERROR &nbsp; &nbsp; [junit] null expected:\<...NAME` MODIFY `NAME` [integer](3) NOT NULL DEFAULT...\> but was:\<...NAME` MODIFY `NAME` [INT](3) NOT NULL DEFAULT...\> &nbsp; &nbsp; [junit]&nbsp; &nbsp; at liquibase.change.ModifyColumnChangeTest.generateFullStatementForMysql(ModifyColumnChangeTest.java:85)

liquibase.database.H2DatabaseTest errors out in the escapeTableName\_noSchema and escapeTableName\_withSchema tests.

&nbsp; &nbsp; [junit] Testcase: escapeTableName\_noSchema(liquibase.database.H2DatabaseTest):&nbsp; &nbsp; &nbsp; Caused an ERROR &nbsp; &nbsp; [junit] null expected:\<[`tableName`]\> but was:\<Name]\> &nbsp; &nbsp; [junit]&nbsp; &nbsp; at liquibase.database.H2DatabaseTest.escapeTableName\_noSchema(H2DatabaseTest.java:73) &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] &nbsp; &nbsp; [junit] Testcase: escapeTableName\_withSchema(liquibase.database.H2DatabaseTest):&nbsp; &nbsp; Caused an ERROR &nbsp; &nbsp; [junit] null expected:\<[`schemaName`.`tableName`]\> but was:\<[schemaName.tableName]\> &nbsp; &nbsp; [junit]&nbsp; &nbsp; at liquibase.database.H2DatabaseTest.escapeTableName\_withSchema(H2DatabaseTest.java:79)

JAVA\_HOME points to JDK 1.5 (I usually build with JDK 6 but Liquibase seems to want 1.5.)

Ant is 1.7.0.

I’m building on cygwin under Windows XP.

Do these test cases currently pass for other people?&nbsp; If so, then it’s something in my environment that I need to fix, or maybe I’m grabbing the code wrong or building it wrong.&nbsp; But looking at the first one, I’m not so sure it’s me.&nbsp; I thought it might be leftovers from a previous version of Liquibase, but I’ve cleared out my CLASSPATH.

Is the official daily build junit results posted online somewhere?

thanks for any help,  
shoover

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 8, 2009, 5:26pm UTC](https://forum.liquibase.org/t/problem-building-testing-1-9-x-branch-failing-tests/1341/2 "2009-07-08T17:26:00Z")

</div>

It isn’t a problem with your setup, it is a problem with the tests and ant test command.&nbsp; We don’t have a build server (which is part of the problem:) ).

Improving the tests so they don’t fail and they have more test coverage is going on in trunk, we haven’t looked at the 1.9 tests lately, and they will probably not be addressed as a whole.&nbsp; I’ve generally just ran the tests I am interested in through my IDE’s test runner.

The ant build script is checking for java 1.5 because we need to make sure we support 1.5 and don’t compile to an only-1.6 version or use 1.6 APIs.&nbsp; It will compile and execute fine under 1.6. You can create a “build.local.properties” file in core/src/ and set target.java.version=1.6 which will remove the test for you.&nbsp; Otherwise if you are using Eclipse or Intellij there are project files checked in that allow you to use the standard IDE compiler and not need to worry about ant at all.

Does that help?

Nathan

---

<div class="post-metadata">

**Author:** ![shoover\_lb](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shoover\_lb](https://forum.liquibase.org/u/shoover_lb)\
**Post date:** [July 8, 2009, 5:26pm UTC](https://forum.liquibase.org/t/problem-building-testing-1-9-x-branch-failing-tests/1341/3 "2009-07-08T17:26:00Z")

</div>

Thanks, that helps.&nbsp; We are currently on 1.9.3 and wanted to evaluate (against our own code) a performance improvement for checkDatabaseChangeLogTable() on OracleDatabase before submitting it for consideration into the official codebase.&nbsp; 2.x seems to be too different for us to work with at the moment.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 8, 2009, 5:26pm UTC](https://forum.liquibase.org/t/problem-building-testing-1-9-x-branch-failing-tests/1341/4 "2009-07-08T17:26:00Z")

</div>

There is a liquibase.dbtest.oracle.OracleSampleChangeLogRunnerTest test that does a fairly extensive integration test that should pass before your changes.&nbsp; You may need to tweak the URL in the constructor for your database if it is not a localhost XE database.&nbsp; It assumes there is a “liquibase” user with password “liquibase”.

The 2.x code base is quite a bit different at this point.&nbsp; If you send or commit a patch to 1.9 I can give you some pointers on how it would apply to the 2.0 codebase.

Nathan
