You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metamodel.apache.org by to...@apache.org on 2014/10/16 16:58:40 UTC
[01/10] git commit: Issue METAMODEL-75: Travis configuration for
CouchDB integration testing.
Repository: incubator-metamodel
Updated Branches:
refs/heads/master 0e5aa76bf -> fcb529fe0
Issue METAMODEL-75: Travis configuration for CouchDB integration
testing.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/5ad3b576
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/5ad3b576
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/5ad3b576
Branch: refs/heads/master
Commit: 5ad3b5766bb404f5c71d2971d94e24261b43bc3c
Parents: 560dd66
Author: tomaszguzialek <to...@humaninference.com>
Authored: Wed Oct 8 14:32:31 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Wed Oct 8 14:32:31 2014 +0200
----------------------------------------------------------------------
.travis.yml | 6 ++
.../metamodel/couchdb/CouchDbTestCase.java | 48 +++++++----
...del-integrationtest-configuration.properties | 86 ++++++++++++++++++++
3 files changed, 124 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/5ad3b576/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index cafe7cf..3732d34 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,12 @@ jdk:
- openjdk7
- oraclejdk8
+services:
+ - couchdb
+
+before_script:
+ - curl -X PUT localhost:5984/metamodel_test_database
+
after_success:
- mvn test
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/5ad3b576/couchdb/src/test/java/org/apache/metamodel/couchdb/CouchDbTestCase.java
----------------------------------------------------------------------
diff --git a/couchdb/src/test/java/org/apache/metamodel/couchdb/CouchDbTestCase.java b/couchdb/src/test/java/org/apache/metamodel/couchdb/CouchDbTestCase.java
index bfcc24a..9e1ede5 100644
--- a/couchdb/src/test/java/org/apache/metamodel/couchdb/CouchDbTestCase.java
+++ b/couchdb/src/test/java/org/apache/metamodel/couchdb/CouchDbTestCase.java
@@ -19,13 +19,15 @@
package org.apache.metamodel.couchdb;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileReader;
+import java.io.IOException;
import java.util.Properties;
import junit.framework.TestCase;
public abstract class CouchDbTestCase extends TestCase {
-
+
private static final String DEFAULT_TEST_DATABASE_NAME = "eobjects_metamodel_test";
private String _hostname;
@@ -36,23 +38,37 @@ public abstract class CouchDbTestCase extends TestCase {
protected void setUp() throws Exception {
super.setUp();
- Properties properties = new Properties();
File file = new File(getPropertyFilePath());
if (file.exists()) {
- properties.load(new FileReader(file));
- _hostname = properties.getProperty("couchdb.hostname");
- _databaseName = properties.getProperty("couchdb.databaseName");
- if (_databaseName == null || _databaseName.isEmpty()) {
- _databaseName = DEFAULT_TEST_DATABASE_NAME;
- }
-
- _configured = (_hostname != null && !_hostname.isEmpty());
-
- if (_configured) {
- System.out.println("Loaded CouchDB configuration. Hostname=" + _hostname + ", Database=" + _databaseName);
- }
+ loadPropertyFile(file);
} else {
- _configured = false;
+ // Continuous integration case
+ if (System.getenv("CONTINUOUS_INTEGRATION") != null) {
+ File travisFile = new File("../travis-metamodel-integrationtest-configuration.properties");
+ if (travisFile.exists()) {
+ loadPropertyFile(travisFile);
+ } else {
+ _configured = false;
+ }
+ } else {
+ _configured = false;
+ }
+ }
+ }
+
+ private void loadPropertyFile(File file) throws IOException, FileNotFoundException {
+ Properties properties = new Properties();
+ properties.load(new FileReader(file));
+ _hostname = properties.getProperty("couchdb.hostname");
+ _databaseName = properties.getProperty("couchdb.databaseName");
+ if (_databaseName == null || _databaseName.isEmpty()) {
+ _databaseName = DEFAULT_TEST_DATABASE_NAME;
+ }
+
+ _configured = (_hostname != null && !_hostname.isEmpty());
+
+ if (_configured) {
+ System.out.println("Loaded CouchDB configuration. Hostname=" + _hostname + ", Database=" + _databaseName);
}
}
@@ -69,7 +85,7 @@ public abstract class CouchDbTestCase extends TestCase {
public boolean isConfigured() {
return _configured;
}
-
+
public String getHostname() {
return _hostname;
}
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/5ad3b576/travis-metamodel-integrationtest-configuration.properties
----------------------------------------------------------------------
diff --git a/travis-metamodel-integrationtest-configuration.properties b/travis-metamodel-integrationtest-configuration.properties
new file mode 100644
index 0000000..6d5c65e
--- /dev/null
+++ b/travis-metamodel-integrationtest-configuration.properties
@@ -0,0 +1,86 @@
+#Configuration file for the integration tests of Apache MetaModel.
+#This file contains externalized properties which enable the test
+#code to connect to actual running backends for testing the real integration.
+
+# -----------
+# HOW TO USE:
+# -----------
+# To use this file, copy it into your user home directory and uncomment the lines of relevance to you
+
+# --------------------------
+# CouchDB module properties:
+# --------------------------
+
+couchdb.hostname=localhost
+couchdb.databaseName=metamodel_test_database
+
+# --------------------------
+# MongoDB module properties:
+# --------------------------
+
+#mongodb.hostname=localhost
+#mongodb.databaseName=metamodel_test
+#mongodb.collectionName=my_collection
+
+# ------------------------
+# HBase module properties:
+# ------------------------
+
+#hbase.zookeeper.hostname=localhost
+#hbase.zookeeper.port=2181
+
+# -----------------------
+# JDBC module properties:
+# -----------------------
+
+#jdbc.postgresql.driver=org.postgresql.Driver
+#jdbc.postgresql.url=jdbc:postgresql://localhost/dellstore2
+#jdbc.postgresql.username=metamodel
+#jdbc.postgresql.password=metamodel
+#jdbc.postgresql.longrunningtests=false
+
+#jdbc.mysql.driver=com.mysql.jdbc.Driver
+#jdbc.mysql.url=jdbc:mysql://localhost/sakila?defaultFetchSize=-2147483648
+#jdbc.mysql.username=
+#jdbc.mysql.password=
+
+#jdbc.oracle.driver=oracle.jdbc.OracleDriver
+#jdbc.oracle.url=jdbc:oracle:thin:@localhost:1521:XE
+#jdbc.oracle.username=HR
+#jdbc.oracle.password=
+
+#jdbc.db2.driver=com.ibm.db2.jcc.DB2Driver
+#jdbc.db2.url
+#jdbc.db2.username
+#jdbc.db2.password
+
+#jdbc.firebird.driver=org.firebirdsql.jdbc.FBDriver
+#jdbc.firebird.url=jdbc:firebirdsql:127.0.0.1:employee.fdb
+#jdbc.firebird.username=SYSDBA
+#jdbc.firebird.password=
+
+#jdbc.sqlserver.jtds_driver.driver=net.sourceforge.jtds.jdbc.Driver
+#jdbc.sqlserver.jtds_driver.url=jdbc:jtds:sqlserver://localhost:1433/AdventureWorks;instance=SQLEXPRESS
+#jdbc.sqlserver.jtds_driver.username=
+#jdbc.sqlserver.jtds_driver.password=
+
+#jdbc.sqlserver.microsoft_driver.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
+#jdbc.sqlserver.microsoft_driver.url=jdbc:sqlserver://localhost\\SQLEXPRESS;databaseName=AdventureWorks
+#jdbc.sqlserver.microsoft_driver.username=
+#jdbc.sqlserver.microsoft_driver.password=
+
+# -----------------------------
+# Salesforce module properties:
+# -----------------------------
+
+#salesforce.username=
+#salesforce.password=
+#salesforce.securityToken=
+
+# ---------------------------
+# SugarCRM module properties:
+# ---------------------------
+
+#sugarcrm.username=
+#sugarcrm.password=
+#sugarcrm.numberOfAccounts=
\ No newline at end of file
[08/10] git commit: METAMODEL-75 Changed index of a tables array from
1 to 0 in the test.
Posted by to...@apache.org.
METAMODEL-75 Changed index of a tables array from 1 to 0 in the test.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/c37459d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/c37459d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/c37459d1
Branch: refs/heads/master
Commit: c37459d1196c6bf89c86ebafdae58bc29cd602fc
Parents: 835892d
Author: tomaszguzialek <to...@humaninference.com>
Authored: Wed Oct 15 10:43:00 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Wed Oct 15 10:43:00 2014 +0200
----------------------------------------------------------------------
.../java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/c37459d1/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
----------------------------------------------------------------------
diff --git a/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java b/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
index 2f11a4e..a55633b 100644
--- a/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
+++ b/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
@@ -332,7 +332,7 @@ public class MongoDbDataContextTest extends MongoDbTestCase {
// do a query that we cannot push to mongo
// Replace column index 0 by 1
ds = dataContext.query().from(getCollectionName())
- .select(FunctionType.SUM, dataContext.getDefaultSchema().getTables()[1].getColumnByName("id"))
+ .select(FunctionType.SUM, dataContext.getDefaultSchema().getTables()[0].getColumnByName("id"))
.where("foo").isEquals("bar").execute();
assertEquals(InMemoryDataSet.class, ds.getClass());
[04/10] git commit: METAMODEL-75: Removed creation of database by
Travis. Test cases take care of that.
Posted by to...@apache.org.
METAMODEL-75: Removed creation of database by Travis. Test cases take
care of that.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/f48fb95a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/f48fb95a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/f48fb95a
Branch: refs/heads/master
Commit: f48fb95ac835cbdb816a2453e2223f06a84af82b
Parents: e0d0749
Author: tomaszguzialek <to...@humaninference.com>
Authored: Fri Oct 10 09:31:05 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Fri Oct 10 09:31:05 2014 +0200
----------------------------------------------------------------------
.travis.yml | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/f48fb95a/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 3732d34..e4c647c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,9 +7,6 @@ jdk:
services:
- couchdb
-before_script:
- - curl -X PUT localhost:5984/metamodel_test_database
-
after_success:
- mvn test
[03/10] git commit: METAMODEL-75: Changing log level from DEBUG to
WARN in JDBC module because it produced more than 10k lines in Travis build
log and the log is truncated.
Posted by to...@apache.org.
METAMODEL-75: Changing log level from DEBUG to WARN in JDBC module
because it produced more than 10k lines in Travis build log and the log
is truncated.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/e0d07494
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/e0d07494
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/e0d07494
Branch: refs/heads/master
Commit: e0d07494a9d42e8be172bddefbc93399ada2b669
Parents: da206c3
Author: tomaszguzialek <to...@humaninference.com>
Authored: Thu Oct 9 11:51:03 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Thu Oct 9 11:51:03 2014 +0200
----------------------------------------------------------------------
jdbc/src/test/resources/log4j.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/e0d07494/jdbc/src/test/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/jdbc/src/test/resources/log4j.xml b/jdbc/src/test/resources/log4j.xml
index 79b98a6..60a63cf 100644
--- a/jdbc/src/test/resources/log4j.xml
+++ b/jdbc/src/test/resources/log4j.xml
@@ -10,7 +10,7 @@
</appender>
<logger name="org.apache.metamodel">
- <level value="debug" />
+ <level value="warn" />
</logger>
<root>
[02/10] git commit: Issue METAMODEL-75: Excluding
travis-metamodel-integrationtest-configuration.properties from Apache Rat.
Posted by to...@apache.org.
Issue METAMODEL-75: Excluding
travis-metamodel-integrationtest-configuration.properties from Apache
Rat.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/da206c35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/da206c35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/da206c35
Branch: refs/heads/master
Commit: da206c35fc9c379564e2f7a20ceb6b2e94bde55f
Parents: 5ad3b57
Author: tomaszguzialek <to...@humaninference.com>
Authored: Wed Oct 8 16:20:55 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Wed Oct 8 16:20:55 2014 +0200
----------------------------------------------------------------------
pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/da206c35/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f1ce241..97a277e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -336,6 +336,7 @@
<exclude>KEYS</exclude>
<exclude>*.md</exclude>
<exclude>example-metamodel-integrationtest-configuration.properties</exclude>
+ <exclude>travis-metamodel-integrationtest-configuration.properties</exclude>
<exclude>**/.gitignore/**</exclude>
<exclude>.git/**</exclude>
<exclude>**/src/test/resources/**</exclude>
[10/10] git commit: Merge branch 'METAMODEL-75' into master. It fixes
#4.
Posted by to...@apache.org.
Merge branch 'METAMODEL-75' into master. It fixes #4.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/fcb529fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/fcb529fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/fcb529fe
Branch: refs/heads/master
Commit: fcb529fe0b370c5e20c1d48c8c61b819855cdef5
Parents: 0e5aa76 93ea75d
Author: tomaszguzialek <to...@humaninference.com>
Authored: Thu Oct 16 16:58:32 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Thu Oct 16 16:58:32 2014 +0200
----------------------------------------------------------------------
.travis.yml | 4 +
.../metamodel/couchdb/CouchDbTestCase.java | 48 +++++++----
jdbc/src/test/resources/log4j.xml | 2 +-
.../mongodb/MongoDbDataContextTest.java | 3 +-
.../metamodel/mongodb/MongoDbTestCase.java | 55 ++++++++-----
pom.xml | 1 +
...del-integrationtest-configuration.properties | 83 ++++++++++++++++++++
7 files changed, 159 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/fcb529fe/pom.xml
----------------------------------------------------------------------
[06/10] git commit: Merge branch 'master' into METAMODEL-75
Posted by to...@apache.org.
Merge branch 'master' into METAMODEL-75
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/43116c5c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/43116c5c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/43116c5c
Branch: refs/heads/master
Commit: 43116c5c398311e6a566f2232709055baddc58af
Parents: 34523f7 795f091
Author: tomaszguzialek <to...@humaninference.com>
Authored: Wed Oct 15 09:03:05 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Wed Oct 15 09:03:05 2014 +0200
----------------------------------------------------------------------
.../apache/metamodel/AbstractDataContext.java | 2 -
.../metamodel/AbstractUpdateCallback.java | 2 -
.../apache/metamodel/CompositeDataContext.java | 2 -
.../java/org/apache/metamodel/DataContext.java | 2 -
.../InconsistentRowFormatException.java | 2 -
.../metamodel/QueryPostprocessDelegate.java | 3 -
.../apache/metamodel/SchemaNameComparator.java | 2 -
.../org/apache/metamodel/UpdateCallback.java | 2 -
.../java/org/apache/metamodel/UpdateScript.java | 2 -
.../apache/metamodel/UpdateableDataContext.java | 2 -
.../convert/HasReadTypeConverters.java | 2 -
.../convert/StringToBooleanConverter.java | 3 -
.../convert/StringToDateConverter.java | 3 -
.../convert/StringToDoubleConverter.java | 3 -
.../convert/StringToIntegerConverter.java | 3 -
.../apache/metamodel/convert/TypeConverter.java | 3 -
.../create/AbstractTableCreationBuilder.java | 2 -
.../metamodel/create/ColumnCreationBuilder.java | 2 -
.../create/ColumnCreationBuilderImpl.java | 2 -
.../apache/metamodel/create/TableCreatable.java | 2 -
.../metamodel/create/TableCreationBuilder.java | 2 -
.../apache/metamodel/data/AbstractDataSet.java | 2 -
.../java/org/apache/metamodel/data/DataSet.java | 2 -
.../apache/metamodel/data/DataSetIterator.java | 2 -
.../metamodel/data/DataSetTableModel.java | 2 -
.../org/apache/metamodel/data/DefaultRow.java | 2 -
.../org/apache/metamodel/data/EmptyDataSet.java | 2 -
.../apache/metamodel/data/FilteredDataSet.java | 2 -
.../apache/metamodel/data/InMemoryDataSet.java | 2 -
.../org/apache/metamodel/data/RowPublisher.java | 2 -
.../apache/metamodel/data/RowPublisherImpl.java | 2 -
.../java/org/apache/metamodel/data/Style.java | 8 -
.../org/apache/metamodel/data/StyleBuilder.java | 2 -
.../org/apache/metamodel/data/StyleImpl.java | 2 -
.../metamodel/data/SubSelectionDataSet.java | 2 -
.../metamodel/delete/RowDeletionBuilder.java | 2 -
.../insert/AbstractRowInsertionBuilder.java | 2 -
.../apache/metamodel/insert/RowInsertable.java | 2 -
.../metamodel/insert/RowInsertionBuilder.java | 2 -
.../metamodel/intercept/DataSetInterceptor.java | 2 -
.../apache/metamodel/intercept/Interceptor.java | 2 -
.../metamodel/intercept/InterceptorList.java | 2 -
.../metamodel/intercept/QueryInterceptor.java | 2 -
.../intercept/RowDeletionInterceptor.java | 2 -
.../intercept/RowInsertionInterceptor.java | 2 -
.../intercept/RowUpdationInterceptor.java | 2 -
.../metamodel/intercept/SchemaInterceptor.java | 2 -
.../intercept/TableCreationInterceptor.java | 2 -
.../intercept/TableDropInterceptor.java | 2 -
.../org/apache/metamodel/query/FilterItem.java | 42 +++--
.../apache/metamodel/query/OperatorType.java | 31 ++-
.../query/builder/AbstractFilterBuilder.java | 159 +++++++++++++++-
.../builder/AbstractQueryFilterBuilder.java | 118 +++++++++++-
.../metamodel/query/builder/FilterBuilder.java | 136 ++++++++++++--
.../query/builder/GroupedQueryBuilder.java | 3 -
.../query/builder/InitFromBuilder.java | 2 -
.../query/builder/SatisfiedQueryBuilder.java | 2 -
.../apache/metamodel/schema/AbstractColumn.java | 2 -
.../apache/metamodel/schema/AbstractSchema.java | 2 -
.../apache/metamodel/schema/AbstractTable.java | 2 -
.../org/apache/metamodel/schema/Column.java | 2 -
.../metamodel/schema/CompositeSchema.java | 2 -
.../metamodel/schema/ImmutableColumn.java | 2 -
.../metamodel/schema/ImmutableSchema.java | 2 -
.../metamodel/schema/MutableRelationship.java | 2 -
.../apache/metamodel/schema/NamedStructure.java | 2 -
.../apache/metamodel/schema/Relationship.java | 2 -
.../org/apache/metamodel/schema/Schema.java | 2 -
.../java/org/apache/metamodel/schema/Table.java | 2 -
.../metamodel/update/RowUpdationBuilder.java | 2 -
.../java/org/apache/metamodel/util/Action.java | 2 -
.../metamodel/util/AlphabeticSequence.java | 2 -
.../org/apache/metamodel/util/BaseObject.java | 2 -
.../metamodel/util/BooleanComparator.java | 2 -
.../apache/metamodel/util/CollectionUtils.java | 2 -
.../org/apache/metamodel/util/DateUtils.java | 2 -
.../apache/metamodel/util/EqualsBuilder.java | 2 -
.../java/org/apache/metamodel/util/Func.java | 2 -
.../java/org/apache/metamodel/util/HasName.java | 2 -
.../apache/metamodel/util/HasNameMapper.java | 2 -
.../apache/metamodel/util/ImmutableDate.java | 2 -
.../org/apache/metamodel/util/ImmutableRef.java | 2 -
.../java/org/apache/metamodel/util/LazyRef.java | 2 -
.../java/org/apache/metamodel/util/Month.java | 3 -
.../org/apache/metamodel/util/MutableRef.java | 2 -
.../org/apache/metamodel/util/Predicate.java | 2 -
.../java/org/apache/metamodel/util/Ref.java | 2 -
.../metamodel/util/SharedExecutorService.java | 2 -
.../apache/metamodel/util/SimpleTableDef.java | 2 -
.../apache/metamodel/util/UnicodeWriter.java | 3 -
.../java/org/apache/metamodel/util/Weekday.java | 2 -
.../apache/metamodel/query/FilterItemTest.java | 42 ++++-
.../couchdb/CouchDbDataContextTest.java | 37 ++++
.../apache/metamodel/csv/CsvConfiguration.java | 2 -
.../csv/InconsistentRowLengthException.java | 2 -
.../elasticsearch/ElasticSearchMetaData.java | 2 -
.../ElasticSearchMetaDataParser.java | 3 -
.../ElasticSearchDataContextTest.java | 2 +
.../metamodel/excel/ExcelConfiguration.java | 2 -
.../metamodel/excel/ExcelInsertBuilder.java | 2 -
.../excel/ExcelTableCreationBuilder.java | 2 -
.../org/apache/metamodel/excel/ExcelUtils.java | 2 -
.../excel/SpreadsheetReaderDelegate.java | 2 -
.../org/apache/metamodel/excel/XlsDataSet.java | 2 -
.../apache/metamodel/excel/XlsxRowCallback.java | 2 -
.../excel/XlsxStopParsingException.java | 2 -
.../excel/XlsxWorkbookToTablesHandler.java | 2 -
.../metamodel/excel/ZeroBasedRowIterator.java | 2 -
.../fixedwidth/FixedWidthConfiguration.java | 2 -
.../fixedwidth/FixedWidthDataContext.java | 2 -
.../metamodel/fixedwidth/FixedWidthDataSet.java | 2 -
.../metamodel/fixedwidth/FixedWidthReader.java | 2 -
.../InconsistentValueWidthException.java | 2 -
.../metamodel/jdbc/FetchSizeCalculator.java | 2 -
.../metamodel/jdbc/JdbcBatchUpdateCallback.java | 2 -
.../org/apache/metamodel/jdbc/JdbcColumn.java | 2 -
.../metamodel/jdbc/JdbcCreateTableBuilder.java | 2 -
.../metamodel/jdbc/JdbcDeleteBuilder.java | 2 -
.../metamodel/jdbc/JdbcDropTableBuilder.java | 2 -
.../metamodel/jdbc/JdbcInsertBuilder.java | 2 -
.../org/apache/metamodel/jdbc/JdbcSchema.java | 2 -
.../jdbc/JdbcSimpleUpdateCallback.java | 2 -
.../org/apache/metamodel/jdbc/JdbcTable.java | 2 -
.../metamodel/jdbc/JdbcUpdateBuilder.java | 2 -
.../jdbc/CloseableConnectionWrapper.java | 3 -
.../apache/metamodel/jdbc/H2databaseTest.java | 2 -
.../metamodel/jdbc/JdbcDataContextTest.java | 188 +++++++++++++++----
.../apache/metamodel/mongodb/MongoDBUtils.java | 2 -
.../metamodel/mongodb/MongoDbDataContext.java | 44 ++---
.../metamodel/mongodb/MongoDbTableDef.java | 2 -
.../mongodb/MongoDbDataContextTest.java | 61 +++++-
.../metamodel/mongodb/MongoDbDataCopyer.java | 2 -
pom.xml | 7 +-
.../metamodel/xml/XmlSaxContentHandler.java | 2 -
.../metamodel/xml/XmlStopParsingException.java | 2 -
135 files changed, 733 insertions(+), 397 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/43116c5c/pom.xml
----------------------------------------------------------------------
[05/10] git commit: METAMODEL-75: Added MongoDB to Travis.
Posted by to...@apache.org.
METAMODEL-75: Added MongoDB to Travis.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/34523f75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/34523f75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/34523f75
Branch: refs/heads/master
Commit: 34523f75337591e4658577cfa5dabcb7402d966a
Parents: f48fb95
Author: tomaszguzialek <to...@humaninference.com>
Authored: Fri Oct 10 16:36:12 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Fri Oct 10 16:36:12 2014 +0200
----------------------------------------------------------------------
.travis.yml | 1 +
.../metamodel/mongodb/MongoDbTestCase.java | 55 +++++++++++++-------
...del-integrationtest-configuration.properties | 6 +--
3 files changed, 40 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/34523f75/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index e4c647c..a9fbebc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,7 @@ jdk:
services:
- couchdb
+ - mongodb
after_success:
- mvn test
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/34523f75/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbTestCase.java
----------------------------------------------------------------------
diff --git a/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbTestCase.java b/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbTestCase.java
index 446f368..4b83398 100644
--- a/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbTestCase.java
+++ b/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbTestCase.java
@@ -19,7 +19,9 @@
package org.apache.metamodel.mongodb;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileReader;
+import java.io.IOException;
import java.util.Properties;
import junit.framework.TestCase;
@@ -39,31 +41,46 @@ public abstract class MongoDbTestCase extends TestCase {
protected void setUp() throws Exception {
super.setUp();
- Properties properties = new Properties();
File file = new File(getPropertyFilePath());
if (file.exists()) {
- properties.load(new FileReader(file));
- _hostname = properties.getProperty("mongodb.hostname");
-
- _databaseName = properties.getProperty("mongodb.databaseName");
- if (_databaseName == null || _databaseName.isEmpty()) {
- _databaseName = DEFAULT_TEST_DATABASE_NAME;
- }
-
- _collectionName = properties.getProperty("mongodb.collectionName");
- if (_collectionName == null || _collectionName.isEmpty()) {
- _collectionName = DEFAULT_TEST_COLLECTION_NAME;
+ loadPropertyFile(file);
+ } else {
+ // Continuous integration case
+ if (System.getenv("CONTINUOUS_INTEGRATION") != null) {
+ File travisFile = new File("../travis-metamodel-integrationtest-configuration.properties");
+ if (travisFile.exists()) {
+ loadPropertyFile(travisFile);
+ } else {
+ _configured = false;
+ }
+ } else {
+ _configured = false;
}
+ }
+ }
- _configured = (_hostname != null && !_hostname.isEmpty());
+ private void loadPropertyFile(File file) throws FileNotFoundException, IOException {
+ Properties properties = new Properties();
+ properties.load(new FileReader(file));
+ _hostname = properties.getProperty("mongodb.hostname");
+
+ _databaseName = properties.getProperty("mongodb.databaseName");
+ if (_databaseName == null || _databaseName.isEmpty()) {
+ _databaseName = DEFAULT_TEST_DATABASE_NAME;
+ }
+
+ _collectionName = properties.getProperty("mongodb.collectionName");
+ if (_collectionName == null || _collectionName.isEmpty()) {
+ _collectionName = DEFAULT_TEST_COLLECTION_NAME;
+ }
- if (_configured) {
- System.out.println("Loaded MongoDB configuration. Hostname=" + _hostname + ", Collection="
- + _collectionName);
- }
- } else {
- _configured = false;
+ _configured = (_hostname != null && !_hostname.isEmpty());
+
+ if (_configured) {
+ System.out.println("Loaded MongoDB configuration. Hostname=" + _hostname + ", Collection="
+ + _collectionName);
}
+
}
private String getPropertyFilePath() {
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/34523f75/travis-metamodel-integrationtest-configuration.properties
----------------------------------------------------------------------
diff --git a/travis-metamodel-integrationtest-configuration.properties b/travis-metamodel-integrationtest-configuration.properties
index 6d5c65e..7f69bed 100644
--- a/travis-metamodel-integrationtest-configuration.properties
+++ b/travis-metamodel-integrationtest-configuration.properties
@@ -18,9 +18,9 @@ couchdb.databaseName=metamodel_test_database
# MongoDB module properties:
# --------------------------
-#mongodb.hostname=localhost
-#mongodb.databaseName=metamodel_test
-#mongodb.collectionName=my_collection
+mongodb.hostname=localhost
+mongodb.databaseName=metamodel_test
+mongodb.collectionName=my_collection
# ------------------------
# HBase module properties:
[09/10] git commit: METAMODEL-75 Removed "how to use" section and
added a note that this file is for Travis CI.
Posted by to...@apache.org.
METAMODEL-75 Removed "how to use" section and added a note that this
file is for Travis CI.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/93ea75d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/93ea75d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/93ea75d1
Branch: refs/heads/master
Commit: 93ea75d11ccd504a47cde4da84136e69e4657999
Parents: c37459d
Author: tomaszguzialek <to...@humaninference.com>
Authored: Wed Oct 15 10:59:55 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Wed Oct 15 10:59:55 2014 +0200
----------------------------------------------------------------------
travis-metamodel-integrationtest-configuration.properties | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/93ea75d1/travis-metamodel-integrationtest-configuration.properties
----------------------------------------------------------------------
diff --git a/travis-metamodel-integrationtest-configuration.properties b/travis-metamodel-integrationtest-configuration.properties
index 7f69bed..9b52f5d 100644
--- a/travis-metamodel-integrationtest-configuration.properties
+++ b/travis-metamodel-integrationtest-configuration.properties
@@ -2,10 +2,7 @@
#This file contains externalized properties which enable the test
#code to connect to actual running backends for testing the real integration.
-# -----------
-# HOW TO USE:
-# -----------
-# To use this file, copy it into your user home directory and uncomment the lines of relevance to you
+# This file is specific to continuous integration, it contains the configuration for Travis CI service.
# --------------------------
# CouchDB module properties:
[07/10] git commit: METAMODEL-75: Adding a comment just to invoke a
new build in Travis. Cannot invoke it manually as I am not the owner of the
repo.
Posted by to...@apache.org.
METAMODEL-75: Adding a comment just to invoke a new build in Travis.
Cannot invoke it manually as I am not the owner of the repo.
Project: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/commit/835892d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/tree/835892d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metamodel/diff/835892d3
Branch: refs/heads/master
Commit: 835892d39576285d175fd8e43ce21bad30061d28
Parents: 43116c5
Author: tomaszguzialek <to...@humaninference.com>
Authored: Wed Oct 15 09:09:28 2014 +0200
Committer: tomaszguzialek <to...@humaninference.com>
Committed: Wed Oct 15 09:09:28 2014 +0200
----------------------------------------------------------------------
.../java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metamodel/blob/835892d3/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
----------------------------------------------------------------------
diff --git a/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java b/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
index 60d64fd..2f11a4e 100644
--- a/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
+++ b/mongodb/src/test/java/org/apache/metamodel/mongodb/MongoDbDataContextTest.java
@@ -112,6 +112,7 @@ public class MongoDbDataContextTest extends MongoDbTestCase {
}
public void testRead() throws Exception {
+ // Adding a comment to commit something and invoke a build in Travis...
if (!isConfigured()) {
System.err.println(getInvalidConfigurationMessage());
return;