aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.46k stars 407 forks source link

unreliable test: "getRecommendations ... CodeWhisperer service invocation" #2857

Closed justinmk3 closed 2 years ago

justinmk3 commented 2 years ago

This test (and potentially others like it) have been observed to randomly fail in CI:

1) recommendationHandler
       getRecommendations
         should call telemetry function that records a CodeWhisperer service invocation:

      AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

  {
+   codewhispererCursorOffset: '38',
+   codewhispererLanguage: 'python',
+   codewhispererLastSuggestionIndex: '1',
+   codewhispererLineNumber: '1',
+   codewhispererRequestId: '054ce503-303a-4975-a621-2ebffe70a4b3',
+   codewhispererTriggerType: 'OnDemand',
+   duration: 0,
+   reason: 'CodeWhisperer Invocation Exception: ValidationException',
+   result: 'Failed'
-   codewhispererAutomatedTriggerType: 'Enter',
-   codewhispererCompletionType: 'Line',
-   codewhispererCursorOffset: '38',
-   codewhispererLanguage: 'python',
-   codewhispererLastSuggestionIndex: '-1',
-   codewhispererLineNumber: '1',
-   codewhispererRequestId: 'test_request',
-   codewhispererSessionId: 'test_request',
-   codewhispererTriggerType: 'AutoTrigger',
-   duration: 0,
-   result: 'Succeeded'
  }
JadenSimon commented 2 years ago

Should be fixed by https://github.com/aws/aws-toolkit-vscode/pull/2873