[Mondrian] Vagrant VM containing populated databases

Julian Hyde julianhyde at gmail.com
Fri Apr 22 18:45:04 EDT 2016


As part of http://jira.pentaho.com/browse/MONDRIAN-2483 <http://jira.pentaho.com/browse/MONDRIAN-2483>, in order to make it easier to test multiple databases, I propose to restructure the parameters that define test databases. For example, the following would be in build.properties:

mondrian.test.hsqldb.jdbcDrivers=org.hsqldb.jdbcDriver
mondrian.test.hsqldb.foodmart.url=jdbc:hsqldb:res:foodmart
mondrian.test.hsqldb.foodmart.user=FOODMART
mondrian.test.hsqldb.foodmart.password=FOODMART
mondrian.test.mysql.jdbcDrivers=com.mysql.jdbc.Driver
mondrian.test.mysql.foodmart.url=jdbc:mysql://localhost:3306/foodmart
mondrian.test.mysql.foodmart.user=foodmart
mondrian.test.mysql.foodmart.password=foodmart

...and properties for any other databases you want to test.

If you specify -Dmondrian.test.db=hsqldb or do not specify -Dmondrian.test.db it will run against hsqldb.
If you run the test suite with -Dmondrian.test.db=mysql it would use MySQL.

The effect is that we can switch among several databases using just one command-line property.

The Vagrant DB would use port 3306 for MySQL by default. But if that port was taken, you would just need to change it in Vagrantfile and change one line of build.properties.

The database’s JDBC driver must be on the class path. But that’s easy to achieve these days now we’re using Maven.

Julian


> On Apr 22, 2016, at 1:54 AM, Ramazzina, Sergio <sergio.ramazzina at serasoft.it> wrote:
> 
> +1
> 
> On Thu, Apr 21, 2016 at 9:34 PM, Julian Hyde <julianhyde at gmail.com <mailto:julianhyde at gmail.com>> wrote:
> I propose to create a Vagrant VM that contains each database that we would like to test Mondrian against.
> 
> One of the challenges of developing/testing Mondrian is that you have to populate a FoodMart database first. In Calcite we had the same problem, but one of our developers neatly solved it by creating a vagrant VM that populated each required database[1]. We could do the same for Mondrian: the initial set would be, say, MySQL, PostgreSQL, Apache Hive.
> 
> For the Mondrian 4 branch I would go further, and make the default database embedded hsqldb, so Mondrian could build & test with no setup, just “mvn install”. Anyone who wanted to run the integration tests would do “mvn install” on the vagrant repo, would would start and populate the VM, and would run “mvn -Pit install” to enable the integration tests against all of the various databases.
> 
> What do y’all think?
> 
> Julian
> 
> [1] https://github.com/vlsi/calcite-test-dataset/ <https://github.com/vlsi/calcite-test-dataset/>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org <mailto:Mondrian at pentaho.org>
> http://lists.pentaho.org/mailman/listinfo/mondrian <http://lists.pentaho.org/mailman/listinfo/mondrian>
> 
> 
> 
> 
> -- 
> Best Regards/Distinti Saluti
> 
> Sergio Ramazzina
> SeraSoft S.r.l. - Your BIntelligence Partner
> 
> Via Milano 78
> 20013 Magenta (MI) - ITALY
> mobile : +39 347 2103689
> Tel:       +39 02 87158700
> Fax:      +39 02 87151947
> website: http://www.serasoft.it <http://www.serasoft.it/> - email : sergio.ramazzina at serasoft.it <mailto:sergio.ramazzina at serasoft.it>
> skype : sramazzina - Follow me on twitter: sramazzina
> View my profile on LinkedIn: http://www.linkedin.com/in/sramazzina <http://www.linkedin.com/in/sramazzina>
> 
> ---------------------------------------------------------------------------------------------------------------
> RISERVATEZZA / CONFIDENTIALITY
> In ottemperanza del D. L.vo 196/2003 sulla tutela dei dati personali, le informazioni contenute in questo messaggio sono strettamente riservate e sono esclusivamente indirizzate al destinatario indicato,  tenendo presente che qualsiasi uso, riproduzione o divulgazione di questo messaggio è vietata. Nel caso in cui aveste ricevuto questa mail per errore, vogliate avvertire il mittente al più presto a mezzo posta elettronica e distruggere il presente messaggio.
> 
> 
> ACCORDINGLY TO ITALIAN LAW 196/2003 CONCERNING PRIVACY, IF YOU ARE NOT THE ADDRESSEE YOU ARE HEREBY NOTIFIED THAT ANY DISCLOSURE, REPRODUCTION, DISTRIBUTION OR OTHER DISSEMINATION OR USE OF THIS COMMUNICATION IS STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, YOU SHOULD DESTROY IT AND PLEASE NOTIFY US IMMEDIATELY BY EMAIL.
> 
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20160422/1bbeb4df/attachment.html 


More information about the Mondrian mailing list