karlmdavis / rps-tourney

An online multi-player Rock-Paper-Scissors game. Just because.
https://rpstourney.com/
1 stars 2 forks source link

Test case failure: "GameIT.ajaxRefresh:413 Timeout Test case failed ..." #77

Closed karlmdavis closed 9 years ago

karlmdavis commented 9 years ago

Encountered this while running release:perform for the 2.0.0-milestone.2 release. Since it occurred during the perform, but not the prepare, I'm inclined to believe it's an intermittent issue.

com.justdavis.karl.rpstourney.webapp.game.GameIT.txt:

-------------------------------------------------------------------------------
Test set: com.justdavis.karl.rpstourney.webapp.game.GameIT
-------------------------------------------------------------------------------
Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 63.659 sec <<< FAILURE! - in com.justdavis.karl.rpstourney.webapp.game.GameIT
ajaxRefresh(com.justdavis.karl.rpstourney.webapp.game.GameIT)  Time elapsed: 27.21 sec  <<< ERROR!
org.openqa.selenium.TimeoutException: Test case failed. Current page source:
<?xml version="1.0" encoding="UTF-8"?>
<html class=" lt-ie9 js no-flexbox no-canvas no-canvastext no-webgl no-touch no-geolocation postmessage no-websqldatabase no-indexeddb hashchange no-history no-draganddrop no-websockets rgba hsla multiplebgs no-backgroundsize no-borderimage no-borderradius no-boxshadow no-textshadow no-opacity no-cssanimations no-csscolumns cssgradients no-cssreflections no-csstransforms no-csstransforms3d no-csstransitions no-fontface no-generatedcontent no-video no-audio localstorage sessionstorage no-webworkers no-applicationcache no-svg no-inlinesvg no-smil no-svgclippaths" style="">
  <!--<![endif]-->  <head>
    <style>
      article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}
    </style>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <title>
      RPS Tourney: Play a Game!
    </title>
    <meta name="description" content="Play a quick multiplayer game (or 20) of Rock-Paper-Scissors with a friend!"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" href="http://localhost:9093/rps-tourney-webapp/css/rps.css"/>
    <script src="//www.google-analytics.com/analytics.js">
    </script>
    <script src="http://localhost:9093/rps-tourney-webapp/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js">
    </script>
    <script>
//<![CDATA[

            var baseUrl = "http://localhost:9093/rps-tourney-webapp";

//]]>
    </script>
  </head>
  <body style="zoom: 1;">
    <div class="navbar navbar-default navbar-static-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <a class="navbar-brand" href="http://localhost:9093/rps-tourney-webapp">
            RPS Tourney
          </a>
        </div>
        <a href="http://localhost:9093/rps-tourney-webapp/login" id="sign-in" class="btn btn-default navbar-btn navbar-right">

                    Sign In

        </a>
      </div>
    </div>
    <div id="page-content">
      <h1>
        Play a Game!
      </h1>
      <div id="player-controls">
        <div id="player-1-controls">
          <h3 class="player-name player-name-current">
            <span class="player-name-display">
              Player 1
            </span>
            <span class="glyphicon glyphicon-edit" aria-hidden="true">
            </span>
          </h3>
          <form id="command" class="player-name input-group" action="http://localhost:9093/rps-tourney-webapp/game/CKTHtmtgPO/updateName" method="POST" style="display: none;">
            <input type="text" name="inputPlayerName" placeholder="Your Name" value="Player 1" class="form-control"/>
            <span class="input-group-btn">
              <button type="submit" class="player-name-submit btn btn-default">
                Save
              </button>
            </span>
            <div>
              <input type="hidden" name="_csrf" value="66a3e558-bf64-49ed-a1d5-de21dddbf275"/>
            </div>
          </form>
          <div class="player-throws">
            <a class="throw-rock" href="http://localhost:9093/rps-tourney-webapp/game/CKTHtmtgPO/playThrow?throwToPlay=ROCK">
              Rock
            </a>
            <a class="throw-paper" href="http://localhost:9093/rps-tourney-webapp/game/CKTHtmtgPO/playThrow?throwToPlay=PAPER">
              Paper
            </a>
            <a class="throw-scissors" href="http://localhost:9093/rps-tourney-webapp/game/CKTHtmtgPO/playThrow?throwToPlay=SCISSORS">
              Scissors
            </a>
          </div>
          <div class="player-score">
            <h4>
              Score
            </h4>
            <p id="player-1-score-value" class="player-score-value  lost">
              0
            </p>
          </div>
        </div>
        <div id="player-2-controls">
          <h3 class="player-name">
            <span class="player-name-display">
              Player 2
            </span>
          </h3>
          <div class="player-throws">
            <span class="throw-rock">
              Rock
            </span>
            <span class="throw-paper">
              Paper
            </span>
            <span class="throw-scissors">
              Scissors
            </span>
          </div>
          <div class="player-score">
            <h4>
              Score
            </h4>
            <p id="player-2-score-value" class="player-score-value  won">
              1
            </p>
          </div>
        </div>
      </div>
      <div id="round-history">
        <h2>
          Round History
        </h2>
        <p>
          Round: 
          <span id="round-counter-current">
            1
          </span>
           of 
          <span id="round-counter-max">
            1
          </span>
        </p>
        <table id="rounds">
          <thead>
            <tr>
              <th>
                #
              </th>
              <th>
                Player 1
              </th>
              <th>
                Player 2
              </th>
              <th>
                Winner
              </th>
            </tr>
          </thead>
          <tbody>
            <tr id="round-data-0">
              <td>
                1
              </td>
              <td>
                Rock
              </td>
              <td>
                Rock
              </td>
              <td>
                (tied)
              </td>
            </tr>
            <tr id="round-data-1">
              <td>
                1
              </td>
              <td>
                Rock
              </td>
              <td>
                Paper
              </td>
              <td>
                Player 2
              </td>
            </tr>
            <tr id="result-row">
              <td/>
              <td/>
              <td/>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <footer id="page-footer">
      <div class="container">
        <p>
          © 
          <a href="https://justdavis.com/karl/">
            Karl M. Davis
          </a>
          , 2014. Check this project out at 
          <a href="https://github.com/karlmdavis/rps-tourney">
            github.com/karlmdavis/rps-tourney
          </a>
          .
        </p>
      </div>
    </footer>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
    </script>
    <script>
//<![CDATA[
window.jQuery || document.write('<script src="http://localhost:9093/rps-tourney-webapp/js/vendor/jquery-1.11.0.min.js"><\/script>')
//]]>
    </script>
    <script src="http://localhost:9093/rps-tourney-webapp/js/rps.js">
    </script>
    <script src="http://localhost:9093/rps-tourney-webapp/js/game.min.js">
    </script>
    <!-- Google Analytics: UA-43685799-2 is the rpstourney.com Tracking ID. -->    <script>
//<![CDATA[

            (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
            function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
            e=o.createElement(i);r=o.getElementsByTagName(i)[0];
            e.src='//www.google-analytics.com/analytics.js';
            r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
            ga('create','UA-43685799-2');ga('send','pageview');

//]]>
    </script>
  </body>
</html>

Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47'
System info: host: 'jordan-u', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-48-generic', java.version: '1.7.0_75'
Driver info: driver.version: unknown
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.findElementByXPath(HtmlUnitDriver.java:1047)
    at org.openqa.selenium.By$ByXPath.findElement(By.java:357)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver$5.call(HtmlUnitDriver.java:1565)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver$5.call(HtmlUnitDriver.java:1562)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.implicitlyWaitFor(HtmlUnitDriver.java:1241)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.findElement(HtmlUnitDriver.java:1562)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.findElement(HtmlUnitDriver.java:530)
    at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:730)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:39)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:312)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:308)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
    at com.justdavis.karl.rpstourney.webapp.game.GameIT.ajaxRefresh(GameIT.java:406)
karlmdavis commented 9 years ago

I've zipped up the failsafe-reports directory and saved it as /home/karl/workspaces/rps-tourney/failsafe-reports-issue-77-a.zip on jordan-u.

karlmdavis commented 9 years ago

Wow, this one is going to be tough to track down.

My current best guess is that it's at least partly a duplicate of Issue #77 and/or Issue #78, but it's hard to be sure. Think I need to try and reproduce, as follows:

$ cd rps-tourney.git
$ mvn clean install
$ cd rps-tourney-webapp
$ watch --interval 0 --errexit mvn verify -DskipTests=true -Dit.test=GameIT#ajaxRefresh\*
karlmdavis commented 9 years ago

The above looped run was unable to reproduce this issue, in about 2500 iterations (26 hours). Marking this as resolved.