Results 1 to 1 of 1

Thread: Async it test fails: Timeout waiting for test step to complete (5 Sec) problem

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2015
    Posts
    13

    Default Async it test fails: Timeout waiting for test step to complete (5 Sec) problem

    We have been having problems with Promises appearing to not work for intervals greater than 5 seconds. So I modeled a simple example from https://jasmine.github.io/2.1/introduction site. Code below (image of failure error message attached). The code overrides the default jasmine interval from 5 seconds to 30 seconds. However, even though console.log indicates the override took, the setTimeout async test fails.

    We are trialing sencha test 2_1_0_81 (and have been using Sencha since Ext3.. - we love the product) however, if we can not get Async/Promises to work for intervals greater than 5 seconds we will not be able to purchase sencha test. Again, the test below is a basic test, it failing has us concerned that our promise code is failing for similar reasons. What are we doing wrong? HELP :-)

    jasmine.DEFAULT_TIMEOUT_INTERVAL = 30 * 1000;
    describe("issuetest", function() {

    it("should pass", function() {
    console.log(" jas interval=" + jasmine.DEFAULT_TIMEOUT_INTERVAL);
    expect(1).toBe(1);
    });
    it("9 sec exceeds 5 but not new 10 sec def should pass.", function(done) {
    setTimeout(function() {
    expect(1).toBe(1);
    done();
    }, 9000);
    });
    });
    Attached Images Attached Images

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi Henry--

    Try setting ST.options.timeout instead. It's what controls the timeout for each spec:

    Code:
    describe("issuetest", function() {
        ST.options.timeout = 10000;
    
    
        it("9 sec exceeds 5 but not new 10 sec def should pass.", function(done) {
            
            setTimeout(function() {
                expect(1).toBe(1);
                done();
            }, 9000);
        });
    });
    Note: This can also be accomplished via "Options => Timeout" in the runner.

    Thanks!
    Joel

Similar Threads

  1. Replies: 1
    Last Post: 3 Feb 2017, 8:59 AM
  2. Replies: 5
    Last Post: 2 Feb 2017, 8:42 AM
  3. Replies: 2
    Last Post: 4 Aug 2016, 4:27 AM
  4. Replies: 4
    Last Post: 26 Jan 2016, 3:13 AM
  5. EXTJS and Test Complete
    By wsmith in forum Community Discussion
    Replies: 7
    Last Post: 21 Mar 2013, 10:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •