ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nahappan Somasundaram (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-13721) Ambari functional tests infrastructure
Date Thu, 05 Nov 2015 20:23:27 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-13721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nahappan Somasundaram updated AMBARI-13721:
-------------------------------------------
    Description: 
Run a test version of the ambari-server with an in-memory DB and ambari-agent that run during
the functional testing and cover several basic use cases  like heartbeat monitoring, adding
and deleting services, components, hosts, etc.

Functional test design: 
The functional tests run the same way as unit tests, using JUnit 
Enabling/disabling of the functional tests can be done using a Maven configuration. 
The building blocks of the functional tests are: 
A local ambari server that wraps the actual AmbariServer implementation with Guice to instantiate
an in-memory database (use the existing InMemoryDefaultTestModule class) 
Methods to set up a default cluster with a few hosts, with each host running components like
Ambari Metrics Service, HDFS, YARN and Zookeeper. These methods use the ambari server's RESTful
APIs. 
Methods that use HttpClient to perform operations using the RESTful APIs to add/remove cluster,
hosts, services, service components and service component hosts. 
A simple functional test to start the local server on a thread, get status from the server
and then shutdown. 
Additional unit tests can be built on top of the start-status check-stop functional tests,
default cluster setup method and helper methods to test specific scenarios. 
 
Future work: 
Local ambari agent simulator for each host.

  was:
Run a test version of the ambari-server with an in-memory DB and ambari-agent that run during
the functional testing and cover several basic use cases  like heartbeat monitoring, adding
and deleting services, components, hosts, etc.

** Functional test design: **
* The functional tests run the same way as unit tests, using JUnit 
* Enabling/disabling of the functional tests can be done using a Maven configuration. 
* The building blocks of the functional tests are: 
        ** A local ambari server that wraps the actual AmbariServer implementation with Guice
to instantiate an in-memory database (use the   existing InMemoryDefaultTestModule class)

        ** Methods to set up a default cluster with a few hosts, with each host running components
like Ambari Metrics Service, HDFS, YARN and Zookeeper. These methods use the ambari server's
RESTful APIs. 
        ** Methods that use HttpClient to perform operations using the RESTful APIs to add/remove
cluster, hosts, services, service components and service component hosts. 
        ** A simple functional test to start the local server on a thread, get status from
the server and then shutdown. 
* Additional unit tests can be built on top of the start-status check-stop functional tests,
default cluster setup method and helper methods to test specific scenarios. 
 
** Future work: **
* Local ambari agent simulator for each host.


> Ambari functional tests infrastructure
> --------------------------------------
>
>                 Key: AMBARI-13721
>                 URL: https://issues.apache.org/jira/browse/AMBARI-13721
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>    Affects Versions: 2.1.3
>            Reporter: Nahappan Somasundaram
>            Assignee: Nahappan Somasundaram
>             Fix For: 2.1.3
>
>
> Run a test version of the ambari-server with an in-memory DB and ambari-agent that run
during the functional testing and cover several basic use cases  like heartbeat monitoring,
adding and deleting services, components, hosts, etc.
> Functional test design: 
> The functional tests run the same way as unit tests, using JUnit 
> Enabling/disabling of the functional tests can be done using a Maven configuration. 
> The building blocks of the functional tests are: 
> A local ambari server that wraps the actual AmbariServer implementation with Guice to
instantiate an in-memory database (use the existing InMemoryDefaultTestModule class) 
> Methods to set up a default cluster with a few hosts, with each host running components
like Ambari Metrics Service, HDFS, YARN and Zookeeper. These methods use the ambari server's
RESTful APIs. 
> Methods that use HttpClient to perform operations using the RESTful APIs to add/remove
cluster, hosts, services, service components and service component hosts. 
> A simple functional test to start the local server on a thread, get status from the server
and then shutdown. 
> Additional unit tests can be built on top of the start-status check-stop functional tests,
default cluster setup method and helper methods to test specific scenarios. 
>  
> Future work: 
> Local ambari agent simulator for each host.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message