[Commits] [wesnoth/wesnoth] 0d4bd2: Turn off excessive logging of MP tests

GitHub noreply at github.com
Sat Sep 3 13:47:50 UTC 2016


  Branch: refs/heads/debug-multiplayer-test-failures
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 0d4bd206d96df1150fbcbe82315fc43f4a068055
      https://github.com/wesnoth/wesnoth/commit/0d4bd206d96df1150fbcbe82315fc43f4a068055
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M utils/travis/mp_test_executor.sh

  Log Message:
  -----------
  Turn off excessive logging of MP tests


  Commit: 24df62476087e30a85ab163f79711f26fe9d86f8
      https://github.com/wesnoth/wesnoth/commit/24df62476087e30a85ab163f79711f26fe9d86f8
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-09-03 (Sat, 03 Sep 2016)

  Changed paths:
    M join.lua
    M src/play_controller.cpp

  Log Message:
  -----------
  Fix multiplayer tests failing in Travis CI

It depends on timing whether or not the guest shows the wait dialog between
scenarios. If the second scenario has already started when the guest tries
to show the dialog, the dialog is skipped: otherwise it's shown and it
changes the plugin context.

The join.lua plugin assumed the change of plugin context to mean that the
test is over and that the plugin should quit the game. As a result, it
ended up quitting in the middle of the test if the second scenario hadn't
started yet.

Commit 6016bdf2 tried to fix the problem by allowing the plugin context to
change once during the test. It resulted in the opposite problem: if the
second scenario *had* started, the plugin context didn't change. When the
test ended and the guest was thrown into the lobby, then the plugin
assumed that it was just the scenario change and kept waiting for the next
scenario that wasn't coming.

This commit finally fixes the problem by explicitly polling the name of the
scenario being played. Now join.lua ignores plugin context changes as long
as the last scenario hasn't started, but starts waiting for the game to end
when the scenario starts.

I verified locally that, with these changes applied, the tests pass both
with an unmodified build and with a build that has an artificial delay to
simulate the timing in Travis.


Compare: https://github.com/wesnoth/wesnoth/compare/1d973b702026...24df62476087


More information about the Commits mailing list