Skip to content

Commit

Permalink
Attempt to fix tests
Browse files Browse the repository at this point in the history
The poll() function was removed, but perhaps it's doesn't need to be replaced since we now handle
everything in the wesnothd_connection worker thread.
  • Loading branch information
Vultraz committed Aug 6, 2019
1 parent 115cf7d commit 80d26af
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/tests/gui/test_gui2.cpp
Expand Up @@ -826,30 +826,11 @@ struct dialog_tester<hotkey_bind>
}
};

struct wesnothd_connection_init
{
wesnothd_connection_init(wesnothd_connection& conn)
{
//Swallow the 'cannot connect' execption so that the connection object doesn't throw while we test the dialog.
try
{
while (true) {
conn.poll();
}
}
catch (...)
{

}
}
};

template<>
struct dialog_tester<mp_lobby>
{
config game_config;
wesnothd_connection connection;
wesnothd_connection_init init;
std::vector<std::string> installed_addons;
mp::lobby_info li;
dialog_tester() : connection("", ""), init(connection), li(installed_addons)
Expand All @@ -875,7 +856,6 @@ struct dialog_tester<lobby_player_info>
config c;
fake_chat_handler ch;
wesnothd_connection connection;
wesnothd_connection_init init;
mp::user_info ui;
std::vector<std::string> installed_addons;
mp::lobby_info li;
Expand Down

0 comments on commit 80d26af

Please sign in to comment.