Skip to content
Tamir Schwarz edited this page Jul 10, 2017 · 27 revisions

Prerequisites

We use Docker to run InsightEdge in the container.

  1. Install Docker https://docs.docker.com/engine/installation. For Amazon Linux instances see this doc.
  2. On Mac install native Docker, not boot2docker. Before running tests export DOCKER_HOST=unix:///var/run/docker.sock. Not sure if it's OK to make this variable global.
  3. If required, add your user to docker group, so you can run docker run hello-world without sudo, see details here

Run tests

To only build an image and skip tests, premium or community:

mvn -pl insightedge-integration-tests -P run-integration-tests-community -DskipTests clean verify
mvn -pl insightedge-integration-tests -P run-integration-tests-premium   -DskipTests clean verify

To run a single test, eg org.insightedge.spark.zeppelin.ZeppelinNotebooksSpec:

TEST_FOLDER=... # where all the insightedge components will save their logs - this folder should contains sub-folder named 'output'
mvn -pl insightedge-integration-tests -P run-integration-tests-premium -DwildcardSuites=org.insightedge.spark.zeppelin.ZeppelinNotebooksSpec -Dtest.foler=${TEST_FOLDER} clean verify 

To run a test tagged as LongRunningTest , eg org.insightedge.spark.maven.MavenInstallLibsSpec use only-long-running-test maven profile :

TEST_FOLDER=... # where all the insightedge components will save their logs - this folder should contains sub-folder named 'output'
mvn -pl insightedge-integration-tests -P run-integration-tests-premium -P only-long-running-test -DwildcardSuites=org.insightedge.spark.maven.MavenInstallLibsSpec -Dtest.foler=${TEST_FOLDER} clean verify

Zeppelin Rest API

Implemented integration tests

Zeppelin tutorials {scala spec} {docker}

  • starts demo container
  • checks that Zeppelin contains INSIGHTEDGE-BASIC, INSIGHTEDGE-PYTHON notebooks
  • checks that all paragraphs run successfully in the notebooks
  • stops container

Examples submit {scala spec} {docker}

  • starts demo container
  • checks that insightedge examples run successfully
  • checks that one example fails if you specify wrong space name
  • stops container

Cluster installation {scala spec} {docker}

  • starts a cluster of master, two slaves and a client
  • installs insightedge from client on master and two slaves
  • deploys the space from client
  • checks that one example can be successfully submitted from client
  • stops the cluster

Integration tests to be implemented

InsightEdge configuration {source}

  • should cover all options of insightedge.sh, e.g. specifying custom lookup groups or a space name
  • should cover failures when user specifies incorrect options for insightedge.sh

Submitting custom libs {source}

  • should check if submitting custom application with several --jars specified works using insightedge-submit

Failover tolerance

  • starts a cluster with backups
  • runs a long job and drops one of the cluster nodes (full container)
  • should verify that cluster recovers from failure by switching backup to primary and the job succeeds

Test that insightedge-maven.sh installs artifacts

  • install maven
  • run insightedge-maven.sh
  • check if artifacts exist in local repo mvn dependency:get -Dartifact=g:a:v -o -DrepoUrl=file://path/to/your/repo

Test detailed scripts without insightedge.sh

  • execute next scripts from /sbin and verify the behavior, cover failures with wrong inputs:
  • start/stop-datagrid-master/slave.sh - can be verified with gs.sh
  • deploy/undeploy-datagrid.sh - can be verified via connecting to space in code
  • start/stop-zeppelin.sh - can be verified with Zeppelin REST-API
  • execute scripts one after another verifying that cluster is running in the middle and is fully stopped in the end
  • execute these scripts from $HOME, from /sbin and from random folder with export INSIGHTEDGE_HOME=...

More ideas coming soon...

Clone this wiki locally