[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [test-API PATCH 2/3] repo: Add test for mutualy exclusive console access



On 04/04/2012 08:32 AM, Guannan Ren wrote:
On 04/03/2012 09:20 PM, Peter Krempa wrote:
This test case checks if the console connection code works in a safe way
that the connection don't get messed up.
---
sure about the stream, if we need to call stream.abort() in
finally to
close the certain FD at server part.


+
+ logger.info("Done")
+
+ return ret

The clean function is necessary for testcases.
So we need to add another function named 'console_mutex_clean' to cleanup
the testing environment messed by the testcase. The params is same as
main function.
If nothing need to clean, just write like this.

def console_mutex_clean(params):
"""clean testing environment"""
pass

Hm, this looks like a vast majority of the tests will not do anything in such an method. Wouldn't it be better in this case to make the tests as sublcasses of a new test class and when writing a test, the user would only need to override methods that he wishes to use?



Guannan Ren

--
libvir-list mailing list
libvir-list redhat com
https://www.redhat.com/mailman/listinfo/libvir-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]