Add LSP Client and long running tests in tools#511
Conversation
| const output = data.toString().trim(); | ||
|
|
||
| // Readiness detection | ||
| if (output.includes('cfn-lint version')) { |
There was a problem hiding this comment.
Currently, the only way to determine if lint, guard, and the schemas are ready is through the logs. #507 Introduces a new LSP request which will return the guard, lint, and schema statuses. This addition will make testing more robust and speed up test time, but this PR is functional without this change
|
Our folder and file names are usually camelCased unless its a bin/cli command file |
| export type StandaloneTestMetrics = { | ||
| operationsAttempted: number; | ||
| operationsFailed: number; | ||
| averageDuration: number | null; |
There was a problem hiding this comment.
Can't these just be an array of numbers and the user decides what to do with them
There was a problem hiding this comment.
Because this test could run for a very long time and there are thousands of operations per minute, the duration array could get very large. We should keep the min, max, and average attributes to avoid having to calculate from the array. Added the durations array in case there's any other operations we use in the future, such as median or p99.
| } | ||
| } | ||
|
|
||
| export function generateFinalReport(testStartTime: number): void { |
There was a problem hiding this comment.
What will this report be used for?
There was a problem hiding this comment.
This prints out to the github actions logs upon completing successfully. I wanted to replicate a test coverage output report similar to what you see in vitest. We can't use vitest since it will not work with node 18
| } | ||
| } | ||
|
|
||
| void main(); |
There was a problem hiding this comment.
This will swallow the exception and succeed the run
There was a problem hiding this comment.
Added logic so that the exception is not swallowed in the event an exception (such as hover validation failure) occurs, and it fails fast. In the catch, we will explicitly throw the error
|
Lots of references to "long-running" the caller of the main file defines the duration |
Fixed folder and file names so that folders are camelCased and files are PascalCased, which matches the styling in the rest of the package |
Changed to "Stability" tests instead of calling it LongRunning |
eed185f to
2ddb466
Compare
562aac8 to
30b5b8e
Compare
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.