[test] fix StartTestTC.launch_all_tests method draft
authorDavid Douard <david.douard@logilab.fr>
Tue, 14 Oct 2014 08:49:14 +0200
changeset 1735 ef4cbeb91ec6
parent 1734 e3548d8d2868
child 1736 72ec6c7e956c
[test] fix StartTestTC.launch_all_tests method Ensure TestExecution are listed only once
test/unittest_hooks.py
--- a/test/unittest_hooks.py	Sat Oct 11 17:35:51 2014 +0200
+++ b/test/unittest_hooks.py	Tue Oct 14 08:49:14 2014 +0200
@@ -176,9 +176,9 @@
         """
 
         start_period_tests(cnx, period)
-        cnx.commit() #put new te in base
+        cnx.commit() # put new te in base
         ## make sure they are not waiting execution and REV is filled
-        for te, rev in cnx.execute('Any TE, REV WHERE TE status %(st)s, '
+        for te, rev in cnx.execute('DISTINCT Any TE, REV WHERE TE status %(st)s, '
                                     'TE using_config TC, '
                                     'TE branch BR, '
                                     'TC use_environment PE, '
@@ -192,7 +192,7 @@
             te_e.cw_adapt_to('IWorkflowable').fire_transition('start')
             te_e.cw_set(status=u'running')
             te_e.cw_set(using_revision=rev)
-        cnx.commit() #change new te status
+        cnx.commit() # change new te status
 
     def test_new_vc_trigger(self):
         """ check the on new revision start mode. Run all testconfigs, add new