diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb8a0c196..b1591e222 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,11 @@ default: image: python:3.7 +services: + - name: docker.elastic.co/elasticsearch/elasticsearch:7.11.2 + alias: elasticsearch + command: [ "bin/elasticsearch", "-Expack.security.enabled=false", "-Ediscovery.type=single-node" ] +variables: + ES_JAVA_OPTS: "-Xms512m -Xmx512m" #cache: @@ -41,13 +47,14 @@ test:datanetwork-integration: stage: test script: - pip install tox-travis - - tox -e datanetwork --recreate + - ELASTIC_HOST=elasticsearch tox -e datanetwork --recreate test:blockchain-integration: stage: test script: + - curl "http://elasticsearch:9200/_cat/health" - pip install tox-travis - - tox -e blockchain + - ELASTIC_HOST=elasticsearch tox -e blockchain test:other-integration: stage: test @@ -55,7 +62,7 @@ test:other-integration: - apt-get update - apt-get install -y --no-install-recommends ffmpeg - pip install tox-travis - - tox -e other + - ELASTIC_HOST=elasticsearch tox -e other test:json-api: stage: test diff --git a/lbry/wallet/server/db/elasticsearch/search.py b/lbry/wallet/server/db/elasticsearch/search.py index 6583615c2..fbbf2cb48 100644 --- a/lbry/wallet/server/db/elasticsearch/search.py +++ b/lbry/wallet/server/db/elasticsearch/search.py @@ -54,7 +54,6 @@ class SearchIndex: self.sync_client = AsyncElasticsearch(hosts, timeout=self.sync_timeout) self.search_client = AsyncElasticsearch(hosts, timeout=self.search_timeout) while True: - self.logger.info("DOITDOITDOIT\n\n\n\n%s:%i\n\n\n", self._elastic_host, self._elastic_port) try: await self.sync_client.cluster.health(wait_for_status='yellow') break diff --git a/tox.ini b/tox.ini index 73d57410b..4b6bfe985 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ extras = test changedir = {toxinidir}/tests setenv = HOME=/tmp + ELASTIC_HOST=localhost commands = pip install https://github.com/rogerbinns/apsw/releases/download/3.30.1-r1/apsw-3.30.1-r1.zip \ --global-option=fetch \