Skip to content
Permalink
Branch: master
Commits on Nov 4, 2019
  1. Implmentation using `registerWaiter` explictly cleaning up

    vitch committed Nov 4, 2019
    In this case the waiter doesn't leak but that's because we explictly
    call  `destroy` the tested object.
    
    *If* the object which was registering the waiter was managed by the
    ember container then it would automatically get destroyed which would
    be even better...
  2. Demonstration that `registerWaiter` can also leak

    vitch committed Nov 4, 2019
    And poison subsequent tests if it is used naively. The waiter doesn't get
    torn down so `wait` in a subsequent test still waits for it (see that the
    `console.log`s keep logging after the tests are finished).
    
    I had incorrectly assumed that all waiters would be explictly removed
    between test runs but that seems not to be the case.
  3. Add an contrived example of a waiter leak

    vitch committed Nov 4, 2019
    If we track the running things for our waiter in module scope then we
    run the risk of one test timing out and then poisoning all subsequent
    tests.
    
    You can see that tests B and C work fine if you filter to run just the tests
    in that module but if test A has already run then the bad state is stored
    in module scope and they give misleading failures.
  4. Initial Commit from Ember CLI v3.13.1

    ember-tomster authored and vitch committed Nov 4, 2019
                                                            _...,
                                                         ,:^;,...;
                  -+===;.         ,,--++====++-,,,     .:  /.....,
                :::::~+++++#:,+#++++++++++++++++++#*..:   /,......
               (,,,,,,::=+++##++++++++++++++++++++++#.   :....../
                ...,,,,,::++++++++++++++++++++++++++++++*..,...:
                *..+...,#@@@@@@@@@++++++++++++++++++++++#*....*
                  @#,;##############@@@+*+#@@@@@@@@@@#*++#..<
                  *@##@@+,-*^^^*-+@####@@@######@@@#####@@,,,+
                    @#@*            @#@@@@#@@+--*^^*--#@@@@@@#
                    @#@.    @#      @##+++@#,           .@@#@@
                     #@#    @@     +@@++++#@@     @@     :@@
                     :@#*         @#@++++++@#*    #@     @@+
                    :*+@@#;,.__.+@#@+,-^^.++@#          @@++
                   ;*  :*@@@##@@@@;++r._j^.+@##@+,.__,,@@++.
                  /*    ........+++++++++++++#@@@@@###@@#++++,
                ,:       ...,@@@#++===----==@@@####,,....+++++
               .:       ......@@##@\   ;   :@####@,,...... +++.
               ;       .........@###,   ;  ;xx#@;,,.....   *;+,
               |       ........,*;xxxx--^--=xxx,........   :+#;
               ;         ......,,;xxxxxxxxxxxxx;,.....     *+#
                ;          ......,::xxxx;.     ......       +.   .
                 *;            .........  +###  ....       / ,. /:| ,.
                   .+:             ...  ;##++##, .      ,#. (..v..;*./
                      **                ##  ###*    .:*&&&+. \.,....<,
                       #&+**==-..,,__  ;##  ###  :,*+&&&&&&&v+#&,,.._/
                      #&&&&*...,::,,.  ##; ,##* .*****;:&&&&&&&&&
                     ,+*+;~*..*** *.* ### ###* *******    *+#&;*
                                      ##,;##    ****    :,  **
             #####    ##   ###  ###,  ########       .#####   ;##  ##
            #######  ;##  #### ,###.  ##########    ########  ### ####
           ###  ###  ### ##########   ####  ####   ,##   ###  #######*
          ### ,###  ##############:   ##     ###  #### ,##   :#### ###  ##;
      ##########    ########### ##   .##    ,###  #######    ##### :######
        ######    .###### ####  ##   ###    ### ######*    :#####   ####
           #############  ####  ################    ######## ###
            #####*  *#*    #:   :###   *###*         *####    #*
You can’t perform that action at this time.