Forum | Documentation | Website | Blog

Skip to content
  • Steve Azzopardi's avatar
    Use build timeout when shorter then session timeout · 5bac09cd
    Steve Azzopardi authored
    For `waitForTerminal` check if the build timeout is actually shorter
    then the terminal session timeout. If so, parse the time left, show it
    to the user and use it as a timeout as well.
    
    The reason `timeout` is being updated and used for `time.After` (in the
    select statement) is so we have a good seperation between when
    `ctx.Done` is being called because the user actually cancelled the build
    and when the context deadline is reached.
    
    Add `RoundDuration` which is the same as `time.duration.Round` but since
    we are using go1.8 it is missing.
    
    Add a test cases for each scenario `waitForTerminal` has.
    5bac09cd