Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Change default discovery interval for Mira to 10 seconds #219

Merged
merged 2 commits into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
command: |
# Spin up a local setup with the previously built docker image.
VER=$(cat workspace/version.txt)
TAG=:${VER} docker-compose up -d
TAG=:${VER} MIRA_ENGINE_DISCOVERY_INTERVAL=1000 docker-compose up -d
- run:
name: Check that services are up and running
command: |
Expand Down
2 changes: 1 addition & 1 deletion src/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const logger = require('./logger/Logger').get();
const defaultMiraApiPort = 9100;
const defaultEngineAPIPort = 9076;
const defaultEngineMetricsPort = 9090;
const defaultEngineDiscoveryInterval = 1000;
const defaultEngineDiscoveryInterval = 10000;
const defaultEngineUpdateInterval = 1000;
const defaultKubernetesProxyPort = 8001;
const defaultDiscoveryLabel = 'qix-engine';
Expand Down
2 changes: 1 addition & 1 deletion src/EngineDiscovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class EngineDiscovery {
this.discoveryInterval = discoveryInterval;
this.updateInterval = updateInterval;
this.engineMap = new EngineMap();
this.discoverySuccessful = false;
this.discoverySuccessful = true;

// Start discovery!
discover.call(this);
Expand Down
3 changes: 3 additions & 0 deletions test/component/kubernetes/component-kubernetes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const specData = require('../../test-data/KubernetesClient.spec.data.json');
const sleep = require('../../test-utils/sleep');
const request = require('supertest');

process.env.MIRA_ENGINE_DISCOVERY_INTERVAL = 1000;
process.env.MIRA_ENGINE_UPDATE_INTERVAL = 1000;

describe('Mira in kubernetes mode', () => {
let app;

Expand Down
2 changes: 2 additions & 0 deletions test/component/local/component-local-no-engines.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const request = require('supertest');
const sleep = require('../../test-utils/sleep');

process.env.DOCKER_HOST = 'http://localhost:8001';
process.env.MIRA_ENGINE_DISCOVERY_INTERVAL = 1000;
process.env.MIRA_ENGINE_UPDATE_INTERVAL = 1000;

describe('Mira in local docker mode with no engines', () => {
let app;
Expand Down
2 changes: 2 additions & 0 deletions test/component/local/component-local-two-engines.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const request = require('supertest');
const sleep = require('../../test-utils/sleep');

process.env.DOCKER_HOST = 'http://localhost:8001';
process.env.MIRA_ENGINE_DISCOVERY_INTERVAL = 1000;
process.env.MIRA_ENGINE_UPDATE_INTERVAL = 1000;

describe('Mira in local docker mode with two engines', () => {
let app;
Expand Down
2 changes: 2 additions & 0 deletions test/component/swarm/component-swarm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const specData = require('../../test-data/SwarmDockerClient.spec.data.json');
const sleep = require('../../test-utils/sleep');

process.env.DOCKER_HOST = 'http://localhost:8001';
process.env.MIRA_ENGINE_DISCOVERY_INTERVAL = 1000;
process.env.MIRA_ENGINE_UPDATE_INTERVAL = 1000;

describe('Mira in docker swarm mode', () => {
let app;
Expand Down