@@ -10,42 +10,7 @@ namespace Microsoft.Graph.Test.Requests.Functional
1010 [ TestClass ]
1111 public class MailTests : GraphTestBase
1212 {
13- [ Ignore ] // Setup Fiddler autoresponder
14- [ TestMethod ]
15- public async Task MailGetGroupWithThrottlingError ( )
16- {
17- try
18- {
19- // All requests should have a client-request-id set so that the client can correlate a
20- // request with a response.
21- var headerOptions = new List < HeaderOption > ( )
22- {
23- new HeaderOption ( "client-request-id" , new Guid ( "dddddddd-dddd-dddd-dddd-dddddddddddd" ) . ToString ( ) )
24- } ;
25-
26- // To get a throttling error, I mocked up a 429 response in a text file and turned on the Fiddler
27- // autoresponder to return the text file as the response envelope. The autoresponder for this
28- // scenario responds to EXACT:https://graph.microsoft.com/v1.0/groups/036bd54c-c6e5-43eb-b8b5-03e019e75bd1
29- var group = await graphClient . Groups [ "036bd54c-c6e5-43eb-b8b5-03e019e75bd1" ] . Request ( headerOptions ) . GetAsync ( ) ;
30- }
31- catch ( Microsoft . Graph . ServiceException e )
32- {
33- if ( ( int ) e . StatusCode == 429 ) // Too Many Requests
34- {
35- // We have the client-request-id for correlating the response to the request that failed.
36- IEnumerable < string > clientrequestidvalues ;
37- Assert . IsTrue ( e . ResponseHeaders . TryGetValues ( "client-request-id" , out clientrequestidvalues ) ) ;
3813
39- // We have the Retry-After that the client can use to wait and resubmit the rejected request.
40- IEnumerable < string > retryaftervalues ;
41- Assert . IsTrue ( e . ResponseHeaders . TryGetValues ( "Retry-After" , out retryaftervalues ) ) ;
42- }
43- else
44- {
45- Assert . Fail ( "Something happened, check out a trace. Error code: {0}" , e . Error . Code ) ;
46- }
47- }
48- }
4914
5015 public async Task < Message > createEmail ( string emailBody )
5116 {
0 commit comments