-
Notifications
You must be signed in to change notification settings - Fork 11
Integration tests
Tamir Schwarz edited this page Jul 10, 2017
·
27 revisions
We use Docker to run InsightEdge in the container.
- Install Docker https://docs.docker.com/engine/installation. For Amazon Linux instances see this doc.
- 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. - If required, add your user to
dockergroup, so you can rundocker run hello-worldwithoutsudo, see details here
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 verifyTo 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 verifyZeppelin tutorials {scala spec} {docker}
- starts demo container
- checks that Zeppelin contains
INSIGHTEDGE-BASIC,INSIGHTEDGE-PYTHONnotebooks - 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
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
--jarsspecified works usinginsightedge-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
/sbinand verify the behavior, cover failures with wrong inputs: -
start/stop-datagrid-master/slave.sh- can be verified withgs.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/sbinand from random folder withexport INSIGHTEDGE_HOME=...
More ideas coming soon...