A simply tryout of how contexts work in golang
The example here executes four faked API calls, that take x seconds to execute (see the apiCallExecutionTime constant)
It gets executed:
- with the regular context timeout value
- with a detached context (that ignores the default timeout value of the parent context)
- with a detached context but with an extended timeout value (still below the API's response time)
- wiht a detached context and an extended timeout value above the API's response time
The expected results here are a "context deadline exceeded" error for usecases 1 and 3, and successful response for usecases 2 and 4