diff --git a/grunt/config/run.js b/grunt/config/run.js index 322e401aa..b2dd95822 100644 --- a/grunt/config/run.js +++ b/grunt/config/run.js @@ -56,6 +56,7 @@ utils.branches.forEach(function (branch) { args.push('-f'); break; case 'master': + case '1.2': case '1.x': args.push('-Des.node.bench=true', '-Des.script.disable_dynamic=false'); break; diff --git a/scripts/_utils.sh b/scripts/_utils.sh index a9204e31f..31b47b5aa 100644 --- a/scripts/_utils.sh +++ b/scripts/_utils.sh @@ -71,12 +71,11 @@ function manage_es { local ES_URL="https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${ES_RELEASE}.zip" local ES_DIR="${SNAPSHOTS}/${ES_VERSION}" else - if [[ $ES_BRANCH == "master" ]]; then - local JDK='JDK7' - elif [[ $ES_BRANCH == "1.x" ]]; then - local JDK='JDK7' - else - local JDK='JDK6' + # TODO: TRASH THIS + if [[ $ES_BRANCH == "master" ]]; then local JDK='JDK7' + elif [[ $ES_BRANCH == "1.x" ]]; then local JDK='JDK7' + elif [[ $ES_BRANCH == "1.2" ]]; then local JDK='JDK7' + else local JDK='JDK6' fi local ES_VERSION="${ES_BRANCH}_nightly" diff --git a/src/lib/apis/index.js b/src/lib/apis/index.js index 5d39beeb2..6d548b692 100644 --- a/src/lib/apis/index.js +++ b/src/lib/apis/index.js @@ -1,7 +1,7 @@ module.exports = { 'master': require('./master'), '1.x': require('./1_x'), - '1.2': require('./1_1'), + '1.2': require('./1_2'), '1.1': require('./1_1'), '1.0': require('./1_0'), '0.90': require('./0_90') diff --git a/src/lib/client.js b/src/lib/client.js index 4d55b4c37..8103ebe3a 100755 --- a/src/lib/client.js +++ b/src/lib/client.js @@ -63,7 +63,7 @@ function Client(config) { delete this._namespaces; } - EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.1'); + EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.2'); if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) { config.sniffEndpoint = '/_cluster/nodes'; } diff --git a/test/unit/specs/client.js b/test/unit/specs/client.js index 639e2dceb..57cdbba65 100644 --- a/test/unit/specs/client.js +++ b/test/unit/specs/client.js @@ -23,17 +23,17 @@ describe('Client instances creation', function () { var def = require('../../../package.json').config.default_api_branch; it('inherits the ' + def + ' API by default', function () { - expect(client.bulk).to.eql(apis[def].bulk); - expect(client.nodes.stats).to.eql(apis[def].nodes.prototype.stats); + expect(client.bulk).to.be(apis[def].bulk); + expect(client.nodes.stats).to.be(apis[def].nodes.prototype.stats); }); - it('inherits the 0.90 API when specified', function () { + it('inherits the 1.0 API when specified', function () { client.close(); client = es.Client({ - apiVersion: '0.90' + apiVersion: '1.0' }); - expect(client.bulk).to.eql(apis['0.90'].bulk); - expect(client.cluster.nodeStats).to.eql(apis['0.90'].cluster.prototype.nodeStats); + expect(client.bulk).to.be(apis['1.0'].bulk); + expect(client.cluster.nodeStats).to.be(apis['1.0'].cluster.prototype.nodeStats); }); it('closing the client causes it\'s transport to be closed', function () {