Merge lp:~alecu/ubuntu-sso-client/daemonize-networkstate-thread into lp:ubuntu-sso-client

Proposed by Alejandro J. Cura
Status: Merged
Approved by: dobey
Approved revision: 936
Merged at revision: 936
Proposed branch: lp:~alecu/ubuntu-sso-client/daemonize-networkstate-thread
Merge into: lp:ubuntu-sso-client
Diff against target: 81 lines (+6/-9)
2 files modified
ubuntu_sso/networkstate/tests/test_windows.py (+4/-7)
ubuntu_sso/networkstate/windows.py (+2/-2)
To merge this branch: bzr merge lp:~alecu/ubuntu-sso-client/daemonize-networkstate-thread
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+99461@code.launchpad.net

Commit message

- Daemonize the network state thread under windows (LP: #963404).

Description of the change

- Daemonize the network state thread under windows (LP: #963404).

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) wrote :

To review this branch: start a syncdaemon instance having this branch in PYTHONPATH, then make sure that the process exits when asking it to quit (for example, using u1sdtool -q).

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good! And is pretty trivial.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (69.2 KiB)

The attempt to merge lp:~alecu/ubuntu-sso-client/daemonize-networkstate-thread into lp:ubuntu-sso-client failed. Below is the output from the failed tests.

*** Running GTK test suite for ubuntu_sso ***
ubuntu_sso.xdg_base_directory.tests.test_common
  TestBaseDirectory
    test_load_config_paths_filter ... [OK]
    test_save_config_path ... [OK]
    test_xdg_cache_home_is_utf8_bytes ... [OK]
    test_xdg_config_dirs_are_bytes ... [OK]
    test_xdg_config_home_is_utf8_bytes ... [OK]
    test_xdg_data_dirs_are_bytes ... [OK]
    test_xdg_data_home_is_utf8_bytes ... [OK]
    test_xdg_home_is_utf8_bytes ... [OK]
twisted.trial.unittest
  TestCase
    runTest ... [OK]
ubuntu_sso.gtk.tests.test_main
  BasicTestCase
    test_main ... [OK]
twisted.trial.unittest
  TestCase
    runTest ... [OK]
ubuntu_sso.gtk.tests.test_gui
  BasicTestCase
    runTest ... [OK]
  BasicUbuntuSSOClientTestCase
    test_app_name_is_stored ... [OK]
    test_cancel_buttons_close_window ... [OK]
    test_close_callback_if_not_set ... [OK]
    test_closing_main_window_calls_close_callback ... [OK]
    test_entries_activates_default ... [OK]
    test_finish_error_shows_error_page ... [OK]
    test_finish_success_shows_success_page ... [OK]
    test_initial_text_for_entries ... [OK]
    test_main_window_is_resizable ... [OK]
    test_main_window_is_visible_at_startup ... [OK]
    test_pages_are_packed_into_container ... [OK]
    test_password_fields_are_password ... [OK]
    test_signals_are_removed ... [OK]
    test_warning_fields_are_cleared ... [OK]
    test_window_icon ... [OK]
  DefaultButtonsTestCase
    test_default_widget_can_default ... [OK]
    test_pages_have_default_widget_set ... [OK]
    test_set_current_page_grabs_focus_for_default_button ... [OK]
  EnterDetailsTestCase
    test_captcha_filename_is_different_each_time ... [OK]
    test_captcha_id_is_stored_when_captcha_is_available ... [OK]
    test_captcha_image_is_a_spinner_at_first ... [OK]
    test_captcha_image_is_not_visible_at_startup ...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (148.9 KiB)

The attempt to merge lp:~alecu/ubuntu-sso-client/daemonize-networkstate-thread into lp:ubuntu-sso-client failed. Below is the output from the failed tests.

*** Running GTK test suite for ubuntu_sso ***
ubuntu_sso.xdg_base_directory.tests.test_common
  TestBaseDirectory
    test_load_config_paths_filter ... [OK]
    test_save_config_path ... [OK]
    test_xdg_cache_home_is_utf8_bytes ... [OK]
    test_xdg_config_dirs_are_bytes ... [OK]
    test_xdg_config_home_is_utf8_bytes ... [OK]
    test_xdg_data_dirs_are_bytes ... [OK]
    test_xdg_data_home_is_utf8_bytes ... [OK]
    test_xdg_home_is_utf8_bytes ... [OK]
twisted.trial.unittest
  TestCase
    runTest ... [OK]
ubuntu_sso.gtk.tests.test_main
  BasicTestCase
    test_main ... [OK]
twisted.trial.unittest
  TestCase
    runTest ... [OK]
ubuntu_sso.gtk.tests.test_gui
  BasicTestCase
    runTest ... [OK]
  BasicUbuntuSSOClientTestCase
    test_app_name_is_stored ... [OK]
    test_cancel_buttons_close_window ... [OK]
    test_close_callback_if_not_set ... [OK]
    test_closing_main_window_calls_close_callback ... [OK]
    test_entries_activates_default ... [OK]
    test_finish_error_shows_error_page ... [OK]
    test_finish_success_shows_success_page ... [OK]
    test_initial_text_for_entries ... [OK]
    test_main_window_is_resizable ... [OK]
    test_main_window_is_visible_at_startup ... [OK]
    test_pages_are_packed_into_container ... [OK]
    test_password_fields_are_password ... [OK]
    test_signals_are_removed ... [OK]
    test_warning_fields_are_cleared ... [OK]
    test_window_icon ... [OK]
  DefaultButtonsTestCase
    test_default_widget_can_default ... [OK]
    test_pages_have_default_widget_set ... [OK]
    test_set_current_page_grabs_focus_for_default_button ... [OK]
  EnterDetailsTestCase
    test_captcha_filename_is_different_each_time ... [OK]
    test_captcha_id_is_stored_when_captcha_is_available ... [OK]
    test_captcha_image_is_a_spinner_at_first ... [OK]
    test_captcha_image_is_not_visible_at_startup ...

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntu_sso/networkstate/tests/test_windows.py'
--- ubuntu_sso/networkstate/tests/test_windows.py 2011-11-11 19:20:59 +0000
+++ ubuntu_sso/networkstate/tests/test_windows.py 2012-03-27 03:05:20 +0000
@@ -1,8 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2#2#
3# Author: Manuel de la Pena<manuel@canonical.com>3# Copyright 2011-2012 Canonical Ltd.
4#
5# Copyright 2011 Canonical Ltd.
6#4#
7# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -80,7 +78,7 @@
8078
8179
82class TestNetworkManagerState(MockerTestCase):80class TestNetworkManagerState(MockerTestCase):
83 """Test he Network Manager State."""81 """Test the Network Manager State."""
8482
85 def setUp(self):83 def setUp(self):
86 super(TestNetworkManagerState, self).setUp()84 super(TestNetworkManagerState, self).setUp()
@@ -109,6 +107,7 @@
109 self.mocker.result(False)107 self.mocker.result(False)
110 self.cb(OFFLINE)108 self.cb(OFFLINE)
111 self.mocker.result(self.thread)109 self.mocker.result(self.thread)
110 self.thread.daemon = True
112 self.thread.start()111 self.thread.start()
113 self.mocker.replay()112 self.mocker.replay()
114 self.state.find_online_state(listener=self.network_manager,113 self.state.find_online_state(listener=self.network_manager,
@@ -120,6 +119,7 @@
120 self.mocker.result(ONLINE)119 self.mocker.result(ONLINE)
121 self.cb(ONLINE)120 self.cb(ONLINE)
122 self.mocker.result(self.thread)121 self.mocker.result(self.thread)
122 self.thread.daemon = True
123 self.thread.start()123 self.thread.start()
124 self.mocker.replay()124 self.mocker.replay()
125 self.state.find_online_state(listener=self.network_manager,125 self.state.find_online_state(listener=self.network_manager,
@@ -127,7 +127,6 @@
127127
128128
129class FakeWininet(object):129class FakeWininet(object):
130
131 """Fake wininet for windll."""130 """Fake wininet for windll."""
132131
133 connection_state = -1132 connection_state = -1
@@ -140,7 +139,6 @@
140139
141140
142class FakeWininetException(object):141class FakeWininetException(object):
143
144 """Fake wininet for windll."""142 """Fake wininet for windll."""
145143
146 connection_state = -1144 connection_state = -1
@@ -153,7 +151,6 @@
153151
154152
155class TestConnection(TestCase):153class TestConnection(TestCase):
156
157 """Test the state of the connection."""154 """Test the state of the connection."""
158155
159 @inlineCallbacks156 @inlineCallbacks
160157
=== modified file 'ubuntu_sso/networkstate/windows.py'
--- ubuntu_sso/networkstate/windows.py 2012-01-04 16:49:43 +0000
+++ ubuntu_sso/networkstate/windows.py 2012-03-27 03:05:20 +0000
@@ -1,7 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2# Author: Manuel de la Pena <manuel@canonical.com>
3#2#
4# Copyright 2011 Canonical Ltd.3# Copyright 2011-2012 Canonical Ltd.
5#4#
6# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
7# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -207,4 +206,5 @@
207 if listener_thread is None:206 if listener_thread is None:
208 listener_thread = Thread(target=listener.register,207 listener_thread = Thread(target=listener.register,
209 name='Ubuntu SSO NetworkManager')208 name='Ubuntu SSO NetworkManager')
209 listener_thread.daemon = True
210 listener_thread.start()210 listener_thread.start()

Subscribers

People subscribed via source and target branches