Open platform to collect and prioritize feedback
tooling: improve CircleCI Build stability (#506)
Guilherme Oenning20c40f4d2f5c
diff --git a/.circleci/config.yml b/.circleci/config.ymlindex c566b73ea..a30f5e72a 100644--- a/.circleci/config.yml+++ b/.circleci/config.yml@@ -1,7 +1,7 @@version: 2references:builder: &builder- getfider/circleci:0.0.11+ getfider/circleci:0.0.12workdir: &workdir/go/src/github.com/getfider/fider@@ -51,11 +51,21 @@ jobs:steps:- checkout- run:- name: setup postgres+ name: waiting for postgres to be readycommand: |- for i in 1 2 3 4 5; do psql -h localhost -p 5432 -U postgres -c "CREATE DATABASE fider_ci" && break || sleep 2; done- for i in 1 2 3 4 5; do psql -h localhost -p 5432 -U postgres -c "CREATE EXTENSION pg_trgm" -d fider_ci && break || sleep 2; done- for i in 1 2 3 4 5; do psql -h localhost -p 5432 -U postgres -c "CREATE USER fider_ci WITH PASSWORD 'fider_ci_pw'" && break || sleep 2; done+ for i in `seq 1 60`;+ do+ nc -z localhost 5432 && echo Success && exit 0+ echo -n .+ sleep 1+ done+ echo Failed waiting for Postgres && exit 1+ - run:+ name: initialize postgres database+ command: |+ for i in 1 2 3 4 5 6 7 8 9 10; do psql -h localhost -p 5432 -U postgres -c "CREATE DATABASE fider_ci" && break || sleep 2; done+ for i in 1 2 3 4 5 6 7 8 9 10; do psql -h localhost -p 5432 -U postgres -c "CREATE EXTENSION pg_trgm" -d fider_ci && break || sleep 2; done+ for i in 1 2 3 4 5 6 7 8 9 10; do psql -h localhost -p 5432 -U postgres -c "CREATE USER fider_ci WITH PASSWORD 'fider_ci_pw'" && break || sleep 2; done- run:name: testcommand: |diff --git a/app/pkg/assert/assert.go b/app/pkg/assert/assert.goindex 13cbf6568..518ea686f 100644--- a/app/pkg/assert/assert.go+++ b/app/pkg/assert/assert.go@@ -175,11 +175,11 @@ func (a *AnyAssertions) Panics() (panicked bool) {return}-//EventuallyEquals asserts that, withtin 5 seconds, the actual function will return same value as expected value+//EventuallyEquals asserts that, withtin 30 seconds, the actual function will return same value as expected valuefunc (a *AnyAssertions) EventuallyEquals(expected interface{}) bool {mustBeFunction(a.actual)- ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)+ ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)defer cancel()ticker := time.NewTicker(100 * time.Millisecond)