AnalyticsTestSanityWithResource creates more objects than required for sanity

Bug #1723234 reported by Vedamurthy Joshi on 2017-10-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Undecided
Vedamurthy Joshi
R4.1
Undecided
Vedamurthy Joshi
Trunk
Undecided
Vedamurthy Joshi

Bug Description

AnalyticsTestSanityWithResource creates more objects than required for sanity

There are 3 sanity cases in it which require 1 VN and 2 VMs in it.
But the common resource object creates 3 Vns and 5 VMs overall.

It would be better to split the resource class into one for sanity and one for all others.
The second class would extend the base sanity resource class

Review in progress for https://review.opencontrail.org/36509
Submitter: Ankit Jain (<email address hidden>)

Review in progress for https://review.opencontrail.org/36510
Submitter: Ankit Jain (<email address hidden>)

Review in progress for https://review.opencontrail.org/36511
Submitter: Ankit Jain (<email address hidden>)

Review in progress for https://review.opencontrail.org/36510
Submitter: Ankit Jain (<email address hidden>)

Review in progress for https://review.opencontrail.org/36511
Submitter: Ankit Jain (<email address hidden>)

Review in progress for https://review.opencontrail.org/36509
Submitter: Ankit Jain (<email address hidden>)

Reviewed: https://review.opencontrail.org/36510
Committed: http://github.com/Juniper/contrail-test/commit/8aacd516d597d47562d26e4b3e922bfa9479179f
Submitter: Zuul (<email address hidden>)
Branch: master

commit 8aacd516d597d47562d26e4b3e922bfa9479179f
Author: ankitja <email address hidden>
Date: Fri Oct 13 16:25:45 2017 +0530

Analytics resource class changes

Currently, setup_common_objects method in BaseResource class also creates the resources not required by the sanity test cases.
To solve this issue, a new class BaseSanityResource with its own setup_common_objects method having minimum resources should be inherited by BaseResource class.
With this change, setup_common_objects method of BaseSanityResource class gets called during sanity run, eliminating the need of creating an instance of BaseResource class.

Change-Id: Ib155776927a1d286b80a1eb640165e0823a280b1
Closes-bug: #1723234

Reviewed: https://review.opencontrail.org/36509
Committed: http://github.com/Juniper/contrail-test/commit/b055b0fbff60b57f644af392152c7b0d94cbb2ef
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit b055b0fbff60b57f644af392152c7b0d94cbb2ef
Author: ankitja <email address hidden>
Date: Fri Oct 13 16:25:45 2017 +0530

Analytics resource class changes

Currently, setup_common_objects method in BaseResource class also creates the resources not required by the sanity test cases.
To solve this issue, a new class BaseSanityResource with its own setup_common_objects method having minimum resources should be inherited by BaseResource class.
With this change, setup_common_objects method of BaseSanityResource class gets called during sanity run, eliminating the need of creating an instance of BaseResource class.

Change-Id: Ib155776927a1d286b80a1eb640165e0823a280b1
Closes-bug: #1723234

Reviewed: https://review.opencontrail.org/36511
Committed: http://github.com/Juniper/contrail-test/commit/ab43248ad39748233b9fed589f13a3c069c522f0
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit ab43248ad39748233b9fed589f13a3c069c522f0
Author: ankitja <email address hidden>
Date: Fri Oct 13 16:25:45 2017 +0530

Analytics resource class changes

Currently, setup_common_objects method in BaseResource class also creates the resources not required by the sanity test cases.
To solve this issue, a new class BaseSanityResource with its own setup_common_objects method having minimum resources should be inherited by BaseResource class.
With this change, setup_common_objects method of BaseSanityResource class gets called during sanity run, eliminating the need of creating an instance of BaseResource class.

Change-Id: Ib155776927a1d286b80a1eb640165e0823a280b1
Closes-bug: #1723234

Ankit Jain (ankitja) wrote :
Download full text (14.4 KiB)

AnalyticsTestSanityWithMin.test_run_contrail_logs_cli_cmd_with_multiple_different_optional_args[sanity] Failure Details

Logs:

Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
pythonlogging:''
stderr
stdout

Traceback (most recent call last):
File "tcutils/wrappers.py", line 162, in wrapper
raise TestFailed("\n ".join(errmsg))
tcutils.cores.TestFailed: Test failed: <class 'fabric.exceptions.CommandTimeout'>
Python 2.7.6: /usr/bin/python
Wed Nov 8 13:24:18 2017

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

/contrail-test/tcutils/wrappers.py in wrapper(self=<serial_scripts.analytics.test_analytics_resourc...ifferent_optional_args[sanity] id=0x7f0ff30c3e90>, *args=(), **kwargs={})
76 log.info('Initial checks done. Running the testcase now')
77 log.info('')
78 result = function(self, *args, **kwargs)
79 except KeyboardInterrupt:
80 raise
result = None
function = <function test_run_contrail_logs_cli_cmd_with_multiple_different_optional_args>
self = <serial_scripts.analytics.test_analytics_resourc...ifferent_optional_args[sanity] id=0x7f0ff30c3e90>
args = ()
kwargs = {}

/contrail-test/serial_scripts/analytics/test_analytics_resource.py in test_run_contrail_logs_cli_cmd_with_multiple_different_optional_args(self=<serial_scripts.analytics.test_analytics_resourc...ifferent_optional_args[sanity] id=0x7f0ff30c3e90>)
170 ]
171
172 return self.test_cmd_output('contrail-logs', cmd_args_list, check_output=True)
173
174 @test.attr(type=['sanity'])
self = <serial_scripts.analytics.test_analytics_resourc...ifferent_optional_args[sanity] id=0x7f0ff30c3e90>
self.test_cmd_output = <bound method AnalyticsTestSanityWithMin.test_cm...fferent_optional_args[sanity] id=0x7f0ff30c3e90>>
cmd_args_list = [{'no_key': ['start-time now-5m', 'end-time now'], 'object-type': 'vrouter'}, {'message-type': 'NodeStatusUVE', 'no_key': ['start-time now-10m', 'end-time now', 'raw'], 'object-type': 'database-node'}, {'message-type': 'CassandraStatusUVE', 'no_key': ['start-time now-2h'], 'node-type': 'Database'}, {'message-type': 'UveVMInterfaceAgentTrace', 'no_key': ['start-time now-10m', 'json'], 'node-type': 'Compute'}, {'message-type': 'SandeshModuleClientTrace', 'module': 'contrail-vrouter-agent', 'no_key': ['start-time now-20m', 'end-time now']}, {'module': 'contrail-api', 'no_key': ['raw'], 'node-type': 'Config'}, {'message-type': 'UveVirtualNetworkAgentTrace', 'module': 'contrail-vrouter-agent', 'no_key': ['last 5m', 'verbose', 'reverse'], 'node-type': 'Compute'}, {'message-type': 'AnalyticsApiStats', 'module': 'contrail-analytics-api', 'no_key': ['json'], 'node-type': 'Analytics '}, {'no_key': ['verbose', 'raw', 'json'], 'object-id': u'b032c710-645a-4b76-93a2-e5c432af7e2b', 'object-type': 'virtual-machine'}, {'message-type': 'AnalyticsApiStats', 'module': 'contrail-analytics-api', 'node-type': 'Analytics'}, {'module': 'contrail-control', 'no_key': ['last 10m'], 'object-type': 'virtual-network'}, {'module': 'contrail-analytics-api', 'node-type': 'Analytics', 'source': u'nodem6'}, {'no_key': ['help']}]
check_output undefined
builtinTrue = Tru...

Ankit Jain (ankitja) wrote :

Sorry wrong window, please ignore the previous post.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers