Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BD52C200BFE for ; Mon, 16 Jan 2017 19:17:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BBEA1160B41; Mon, 16 Jan 2017 18:17:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E05DA160B28 for ; Mon, 16 Jan 2017 19:17:46 +0100 (CET) Received: (qmail 33124 invoked by uid 500); 16 Jan 2017 18:17:46 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 33111 invoked by uid 99); 16 Jan 2017 18:17:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2017 18:17:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id ACCF5C0ABA for ; Mon, 16 Jan 2017 18:17:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.281 X-Spam-Level: ** X-Spam-Status: No, score=2.281 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id qv6v4sLDFRNX for ; Mon, 16 Jan 2017 18:17:41 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 6C4E05FB5B for ; Mon, 16 Jan 2017 18:17:41 +0000 (UTC) Received: from mfilter1-d.gandi.net (mfilter1-d.gandi.net [217.70.178.130]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id EB41F17209D for ; Mon, 16 Jan 2017 19:17:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter1-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter1-d.gandi.net (mfilter1-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id M0H2CEKaHzt0 for ; Mon, 16 Jan 2017 19:17:35 +0100 (CET) X-Originating-IP: 212.195.187.94 Received: from parangon.local (rab34-h03-212-195-187-94.dsl.sta.abo.bbox.fr [212.195.187.94]) (Authenticated sender: paul@nosphere.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id D419D1720B1 for ; Mon, 16 Jan 2017 19:17:34 +0100 (CET) Message-ID: <587D0E3E.2030809@apache.org> Date: Mon, 16 Jan 2017 19:17:34 +0100 From: Paul Merlin User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: dev@polygene.apache.org Subject: Re: Docker based integration testing References: <7eb2255da8c89bbc49d7008b1055566e@nosphere.org> <587B662C.7070200@apache.org> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000103000900090907070400" archived-at: Mon, 16 Jan 2017 18:17:47 -0000 --------------000103000900090907070400 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks for your feedback Niclas! Using the unix:///path/to/docker.sock URL on Linux should do. I'll do another round on that later this week. Cheers Niclas Hedhman a écrit : > DOCKER_* may not be the best way to determine if Docker is present. I am on > a Debian system, and no env variable named DOCKER* is set by default, yet > docker is operational. IIUIC, these variables are needed for Docker Swarm > and other specialized setup where one is not running the container on the > same system as issuing the `docker` command. > > That said, running > ./gradlew :ext:entity-redis:test > > without changing my defaults gives me some errors; > > :extensions:entitystore-redis:test > > org.apache.polygene.entitystore.redis.RedisMapEntityStoreWithCacheTest > > classMethod FAILED > java.lang.ExceptionInInitializerError > Caused by: java.lang.IllegalStateException at > RedisMapEntityStoreWithCacheTest.java:38 > Caused by: com.spotify.docker.client.exceptions.DockerException > at RedisMapEntityStoreWithCacheTest.java:38 > Caused by: java.util.concurrent.ExecutionException at > RedisMapEntityStoreWithCacheTest.java:38 > Caused by: javax.ws.rs.ProcessingException > Caused by: > org.apache.http.conn.HttpHostConnectException > Caused by: java.net.ConnectException > > org.apache.polygene.entitystore.redis.RedisMapEntityStoreTest > classMethod > FAILED > java.lang.ExceptionInInitializerError > Caused by: java.lang.IllegalStateException at > RedisMapEntityStoreTest.java:38 > Caused by: com.spotify.docker.client.exceptions.DockerException > at RedisMapEntityStoreTest.java:38 > Caused by: java.util.concurrent.ExecutionException at > RedisMapEntityStoreTest.java:38 > Caused by: javax.ws.rs.ProcessingException > Caused by: > org.apache.http.conn.HttpHostConnectException > Caused by: java.net.ConnectException > > 2 tests completed, 2 failed > > > And the underlying exception is; > > Caused by: org.apache.http.conn.HttpHostConnectException: Connect to > localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: > Connection refused (Connection refused) > > > Which I presume is due to the gradle-docker-plugin going on the network > protocol instead of the command-line interface. The default docker > interface on Linux seems to be Unix sockets, which most Java apps tend to > ignore and not support. > > 1059 ? Ssl 0:02 docker-containerd -l > unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim > docker-containerd-shim --metrics-interval=0 --start-timeout 2m --state-dir > /var/run/docker/libcontainerd/containerd --runtime docker-runc > > > Hope that helps. I am sending you login separately to a clean/unused server > in Germany, in case you want to run experiments on it. > > Cheers > > On Sun, Jan 15, 2017 at 8:08 PM, Paul Merlin wrote: > >> Could anybody confirm it works for them? >> >> Paul Merlin a écrit : >>> Gang, >>> >>> I pushed changes to the build system and tests to automate integration >>> testing. >>> >>> It uses docker to build the necessary images and run docker containers >>> as a JUnit rule. >>> All this is done only if the DOCKER_HOST environment variable is set, >>> otherwise it's skipped. >>> >>> On linux with docker installed it should work out of the box given you >>> have DOCKER_HOST and DOCKER_CERT_PATH set. >>> >>> On mac you need to: >>> - docker-machine create someFancyNameYouChoose >>> - eval $(docker-machine env someFancyNameYouChoose) >>> >>> On windows, see https://docs.docker.com/machine/reference/env/ >>> >>> With that done, when you now run e.g: >>> >>> ./gradlew :ext:entity-redis:test >>> >>> it will build the docker images and run Redis in a container around >>> the EntityStore tests. >>> >>> The same goes for these extensions: >>> >>> - Memcached Cache >>> - SQL EntityStore using both MySQL and PostgreSQL >>> - SQL Index/Query using PostgreSQL >>> - Riak EntityStore >>> >>> All the others extensions are tested using embedded solutions, >>> including MongoDB. >>> >>> Docker images are built by the :internals:testsupport-internal >>> project, you'll find the Dockerfiles there. >>> >>> Thanks to this I was able to fix a bug I introduced in the Riak ES in >>> recent changes. >>> The only thing actually broken is SQL Index/Query, see >>> https://issues.apache.org/jira/browse/POLYGENE-222 >>> >>> For now these test do not run on CI. >>> builds.apache.org supports docker so we should be able to do that too >>> at some point. >>> In the meantime some of us should run the *whole* test suite from time >>> to time. >>> At least now it should be damn easy to do! >>> >>> Before calling this automation done I'd like to get someone to confirm >>> it 'works for them'. >>> I only tested on a mac. >>> >>> Cheers >>> >>> /Paul >>> > > > --------------000103000900090907070400--