Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autorest: remove testing.T.Fatal() from test goroutine #511

Merged
merged 45 commits into from
Aug 5, 2020
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2e08a55
Deserialize additionalInfo in ARM error
j5lim Jun 13, 2018
03b8d03
Merge branch 'master' of https://github.com/azure/go-autorest into dev
jhendrixMSFT Jul 10, 2018
60d22e3
Allow a new authorizer to be created from a configuration file by spe…
nphmuller Sep 4, 2018
07f5297
[WIP] Using the Context from the timeout if provided (#315)
tombuildsstuff Sep 28, 2018
47d499b
Add NewAuthorizerFromCli method which uses Azure CLI to obtain a toke…
nphmuller Oct 4, 2018
e4490bb
Merge branch 'master' into dev
jhendrixMSFT Oct 9, 2018
0b5e8cb
Merge branch 'master' into dev
jhendrixMSFT Oct 19, 2018
e3e073a
Adding User assigned identity support for the MSIConfig authorizor (#…
samkreter Oct 19, 2018
463d23c
Merge branch 'master' into dev
jhendrixMSFT May 20, 2019
b3989e6
Adding ByteSlicePtr (#399)
draychev May 20, 2019
6dadc53
Adding a new `WithXML` method (#402)
tombuildsstuff May 31, 2019
98c2976
Add HTTP status code response helpers (#403)
jhendrixMSFT Jun 5, 2019
ae1b5cf
adding a new preparer for `MERGE` used in the Storage API's (#406)
tombuildsstuff Jun 19, 2019
a6c3224
New Preparer/Responder for `Unmarshalling Bytes` (#407)
tombuildsstuff Jun 19, 2019
851f98c
Support HTTP-Date in Retry-After header (#410)
jhendrixMSFT Jun 20, 2019
bb605b3
Merge branch 'master' into dev
jhendrixMSFT Jun 21, 2019
ef48668
Add support for multi-tenant authentication (#412)
jhendrixMSFT Jun 25, 2019
31ab60d
rename Options to OAuthOptions (#415)
jhendrixMSFT Jul 1, 2019
76904d2
Merge branch 'master' into dev
jhendrixMSFT Jul 3, 2019
a0512ab
Support custom SendDecorator chains via context (#417)
jhendrixMSFT Jul 8, 2019
1affb82
merge master into dev (#427)
jhendrixMSFT Jul 10, 2019
7340d42
Merge branch 'master' into dev
jhendrixMSFT Jul 23, 2019
3722f8c
Merge branch 'master' into dev
jhendrixMSFT Sep 4, 2019
6d8e7e7
Use accessTokens.json from AZURE_CONFIG_DIR if AZURE_ACCESS_TOKEN_FIL…
pdecat Oct 7, 2019
056d5c6
Merge branch 'master' of https://github.com/azure/go-autorest into dev
jhendrixMSFT Oct 17, 2019
0b055be
Merge branch 'dev' of https://github.com/azure/go-autorest into dev
jhendrixMSFT Oct 17, 2019
87a0e43
support for parsing error messages from xml responses (#465)
tombuildsstuff Oct 21, 2019
e6b2fe5
fix godoc comment for methods that are safe for concurrent use (#475)
tabboud Oct 21, 2019
a5c6556
New Authorizers for Azure Storage (#416)
tombuildsstuff Oct 22, 2019
5f1f2ad
Adding a new Authorizer for SAS Token Authentication (#478)
tombuildsstuff Oct 23, 2019
7820109
token: support for a custom refresh func (#476)
tombuildsstuff Oct 23, 2019
f8ee05f
Fix Dropped Errors (#480)
alrs Oct 30, 2019
be77dbd
Duration order consistency when multiplying number by time unit (#499)
maxifom Feb 4, 2020
81b386e
Merge branch 'master' of https://github.com/Azure/go-autorest into dev
jhendrixMSFT Feb 5, 2020
ee2a686
Drain response bodies (#432)
jhendrixMSFT Feb 5, 2020
4aad125
Enable exponential back-off when retrying on 429 (#503)
jhendrixMSFT Feb 6, 2020
509812e
autorest: remove testing.T.Fatal() from test goroutine
alrs Mar 6, 2020
2e06601
Merge branch 'master' into dev
jhendrixMSFT May 28, 2020
5ac3904
Expose OAuth token provider for use outside autorest (#520)
alespour Jun 5, 2020
18c897a
Fix Go module ambiguous import errors (#528)
miquella Jun 23, 2020
c25826a
Merge branch 'master' into dev
jhendrixMSFT Jun 23, 2020
6badcf9
Update resourceManagerVMDNSSuffix for AzureUSGovernmentCloud (#531)
panicstevenson Jun 23, 2020
5bb054f
This endpoint changed in AzureChinaCloud (#530)
MaurGi Jun 23, 2020
dadf295
Merge branch 'master' into dev
jhendrixMSFT Aug 5, 2020
0701a88
Merge branch 'dev' of https://github.com/Azure/go-autorest into fix-t…
jhendrixMSFT Aug 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions autorest/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1016,18 +1016,24 @@ func TestDoRetryForStatusCodes_Race(t *testing.T) {
sender := DecorateSender(s.Client(),
DoRetryForStatusCodes(0, 0, http.StatusRequestTimeout))

var wg sync.WaitGroup
for i := 0; i < 2; i++ {
wg.Add(1)
runs := 2
errCh := make(chan error, runs)

for i := 0; i < runs; i++ {
go func() {
defer wg.Done()
req, _ := http.NewRequest(http.MethodGet, s.URL, nil)
if _, err := sender.Do(req); err != nil {
t.Fatal(err)
}
// cannot use testing.T.Fatal inside a goroutine, send error down channel
_, err := sender.Do(req)
errCh <- err
}()
}
wg.Wait()
for i := 0; i < runs; i++ {
err := <-errCh
if err != nil {
t.Fatal(err)
}
}
close(errCh)
}

func TestGetSendDecorators(t *testing.T) {
Expand Down