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

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

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]