Commit Graph

1694 Commits

Author SHA1 Message Date
Johannes Rieken 2d97803568 add ListenerRefusalError and ListenerLeakError which get logged when listener thresholds are exceeded. (#212900)
* add `ListenerRefusalError` and `ListenerLeakError` which get logged when listener thresholds are exceeded.

The `stack` property of these errors will point towards the most frequent listener and how often it is used. If that's a high number there is a leak (same listener is added over and over again), if that's a low number there might be a conceptual flaw that an emitter is simply too prominent.

* rightfully don't use Error.captureStackTrace (v8/nodejs only)
2024-05-16 08:29:17 -07:00
Connor Peet 358a3a65d3 fix incomplete coverage reports on macos (#212639)
* eng: fix incomplete coverage reports on macos

Wait for stdout to drain before exiting

* better fix
2024-05-13 15:27:00 -07:00
Robo 5216c04428 chore: update to electron 29 (#209818)
* chore: update electron@29.1.0

* chore: update typings to 20.x

* chore: bump electron@29.1.5

* ci: fix crash in compiling extensions-ci

* chore: disable .d.ts check for build/

$ ../node_modules/.bin/tsc -p tsconfig.build.json
node_modules/@types/chokidar/index.d.ts:21:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/@types/chokidar/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

21 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
                ~~~~~~~~~

node_modules/chokidar/types/index.d.ts:8:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/chokidar/types/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

8 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
               ~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  node_modules/@types/chokidar/index.d.ts:21
     1  node_modules/chokidar/types/index.d.ts:8

Refs https://github.com/paulmillr/chokidar/commit/a0f9e09f64ce7ae70cc6ae1f5615f65cb35f532f

* chore: update core types

* temp: fix layer validation

* chore: update nodejs checksums

* ci: use latest v20 LTS for missing node-gyp

Refs https://github.com/npm/cli/commit/eacec5f49060d3dfcdc3c7043115619e4bb22864

* ci: define LIBCPP_HARDENING_MODE

* ci: fix crash in vscode-web-min-ci

* chore: update rpm deps-list

* chore: bump tree-sitter-typescript@0.20.5

* chore: bump electron@29.3.0

* chore: bump electron@29.3.1

* chore: update rpm deps-list for x86_64

* ci: disable io_uring UV backend on linux

* ci: disable io_uring backend for oss as well

* chore: update typings to 20.x

* ci: add TODO for io_uring workaround

* chore: bump distro

* chore: update preinstall node version checks

* chore: update @types/gulp

Refs https://github.com/microsoft/vscode/issues/212442

* ci: disable io_uring in more test suites
2024-05-11 01:20:28 +09:00
Connor Peet 41f6f5ad6e yea actually that doesn't work 2024-05-08 20:57:52 -07:00
Connor Peet 2aa1079dbb just use v8-to-istanbul 2024-05-08 15:42:43 -07:00
Daniel Imms 3e49f239c9 Enable terminal smoke tests on desktop
Fixes #146811
2024-04-02 09:08:45 -07:00
Daniel Imms 511929fc52 Remove other icon smoke tests 2024-04-01 04:35:44 -07:00
Daniel Imms a00e2b9455 Remove terminal change icon tests as they required quick pick 2024-03-29 11:59:04 -07:00
Benjamin Christopher Simmonds cff275ae64 Adopt custom hover in settings and keybindings editor (#206440)
* adopt custom hover in settings and keybindings editor

* fiy smoketests
2024-02-28 16:37:07 +01:00
Benjamin Christopher Simmonds a8f73340be Fix for smoketest extension installation timeout (#205444)
hover smoke test fix #204771
2024-02-17 17:58:12 +01:00
Logan Ramos 233fd797c0 Skip flaky extension smoke tests (#205309) 2024-02-15 22:05:54 +01:00
Benjamin Christopher Simmonds 5b8fe0ed3e Fix smoke test (#204836)
fix smoke test
2024-02-09 16:47:22 +01:00
Logan Ramos bcf9b4ff0f Skip extension smoketest (#204775) 2024-02-08 22:14:55 +01:00
Benjamin Christopher Simmonds fcaef74d2e Fix smoke tests (#204764)
fix smoke tests
2024-02-08 20:43:28 +01:00
Raymond Zhao fb84f3bcfb test: skip flaky Settings editor smoke test (#202097) 2024-01-09 18:16:42 +01:00
Johannes Rieken 880eee6a96 print warning about reused action ids, fix view action duplication (#202000)
* print warning about reused action ids, fix view action duplication

* remove debug code

* make tests happy-ish
2024-01-08 16:27:32 +01:00
Connor Peet 0385382382 testing: more out-of-editor refinements (#201834)
- Som more tweaks to our own runner scripts to allow asking for the
  generated coverage formats.
- Add actions alongside debug/run for executing coverage profiles
- Finish with displaying function coverage stats in Coverage view,
  allow changing its sort order.

Fixes #200529
Fixes #199380
2024-01-04 21:22:46 +01:00
Connor Peet c016ce64fb testing: misc work on test coverage (#201758)
- Allow coverage bar color thresholds to be configurable as the Java
  folks requested.
- Update some of our scripts for integration into
  the selfhost test runner.
- Initial parts of showing function coverage in the Test Coverage view.
  (Still a work in progress, more tomorrow)
2024-01-04 08:42:22 +01:00
Connor Peet b964ed995a eng: fix waitServer not working in unit test debug (#201334)
Fixes #182341
2023-12-20 14:09:46 -08:00
Martin Aeschlimann 56b0088dce update vscode-test-web (#201187)
* update vscode-test-web

* add @playwright/browser-chromium

* add skipLibCheck

* add skipLibCheck

* use esnext

* cleanup
2023-12-19 16:03:03 +01:00
Connor Peet 027aa0ff19 testing: avoid console log in unit tests (#201141)
Fixes #192468
2023-12-18 18:39:13 +01:00
Johannes Rieken a5698e8857 Joh/rainy-mollusk (#200976)
* snippet completions should also check with the completion model

this will allow to return "more" from the snippet completion item provider and rely on the completions model to do some filtering

* when debugging tests allow to use console.log

* fix https://github.com/microsoft/vscode/issues/191070
2023-12-15 16:07:56 +01:00
Johannes Rieken 3056f52f92 add failing/skipped test for https://github.com/microsoft/vscode/issues/191070 (#200125)
* fix --dev option of unit tests fyi @joaomoreno

* fix timing issue when getting line, add failing/skipped test for https://github.com/microsoft/vscode/issues/191070
2023-12-06 12:16:49 +01:00
Logan Ramos e5e9a6556e Remove extra console.log (#199985) 2023-12-04 22:23:08 +01:00
Connor Peet 81ea8669f2 eng: support runGlob in browser unit tests (#199979)
Fixes #183507
2023-12-04 12:14:25 -08:00
Sandeep Somavarapu 5a7b7be28a throw error (#199653) 2023-11-30 12:58:41 +01:00
Josh Soref 69ddb3f3c6 Write out Cannot (#198377)
spelling: cannot

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-11-20 17:22:21 +00:00
Connor Peet a0b548807a eng: add assertHeap method for memory assertions (#198334)
This adds an `assertHeap` function that can be used in tests. It
takes a heap snapshot, and asserts the state of classes in memory. This
works in Node and the Electron sandbox, but is a no-op in the browser.
Snapshots are process asynchronously and will report failures at the end
of the suite.

This method should be used sparingly (e.g. once at the end of a suite to
ensure nothing leaked before), as gathering a heap snapshot is fairly
slow, at least until V8 11.5.130 (https://v8.dev/blog/speeding-up-v8-heap-snapshots).

When used, the function will ensure the test has a minimum timeout
duration of 20s to avoid immediate failures.

It takes options containing a mapping of class names, and assertion functions
to run on the number of retained instances of that class. For example:

```ts
assertSnapshot({
	classes: {
		ShouldNeverLeak: count => assert.strictEqual(count, 0),
		SomeSingleton: count => assert(count <= 1),
	}
});
```

Closes https://github.com/microsoft/vscode/issues/191920
2023-11-15 10:41:22 -08:00
Henning Dieterichs e2670a457f Fixes "_b is not defined" error 2023-11-15 16:53:00 +01:00
Henning Dieterichs 9ac90beb07 Always report monaco loading errors 2023-11-15 16:53:00 +01:00
Daniel Imms 0fa8f868a5 Correct setting name in smoke test 2023-11-11 05:15:09 -08:00
Daniel Imms d9520bd5dc Add smoke test for multi-line prompt sticky scroll 2023-11-09 08:28:19 -08:00
Daniel Imms 4b2ed32ec3 Clean up, simplify smoke test 2023-11-08 11:15:18 -08:00
Daniel Imms 3794d74d3c Fix polling error compile 2023-11-08 09:49:39 -08:00
Daniel Imms 29ddbd371e Simplify polling 2023-11-08 09:39:40 -08:00
Daniel Imms 35ae6b1925 Use a polling approach for writing and asserting 2023-11-08 09:20:44 -08:00
Daniel Imms d2432a3545 Prevent shell data from leaking into empty term 2023-11-08 08:02:01 -08:00
Daniel Imms 9ad04e81aa Combine write data calls 2023-11-08 07:42:25 -08:00
Daniel Imms bff9161987 Make empty terminal smoke test technique reusable 2023-11-08 07:16:24 -08:00
Daniel Imms bd2d20551d Make sticky scroll smoketest even more consistent 2023-11-08 07:11:14 -08:00
Daniel Imms 90d1e81ce9 Make sticky scroll smoketest more consistent 2023-11-08 06:30:51 -08:00
Daniel Imms 26db70d00a Fix sticky scroll smoketest on linux 2023-11-08 05:58:03 -08:00
Daniel Imms 64ac05a2e9 Add simple terminal sticky scroll smoke test 2023-11-08 05:23:01 -08:00
Daniel Imms 1532b5aebd Add xterm scope to moore places 2023-11-02 06:34:09 -07:00
Sandeep Somavarapu f8f9f06401 whenWorkbenchRestored was not implemented in the driver in previous releases (#197068) 2023-10-31 13:43:02 +01:00
Sandeep Somavarapu 519c8072f3 poll to wait for workbench to be restored (#197059) 2023-10-31 11:23:50 +01:00
Sandeep Somavarapu bee0ea18bd Move wait for workbench restoration to Application (#197053)
#195850: Move wait for workbench restoration to
Application#checkWindowReady
2023-10-31 09:00:40 +01:00
Raymond Zhao e9e1f8a132 Revert "Separate Settings editor open and search steps" (#196997)
Revert "Separate Settings editor open and search steps (#196866)"

This reverts commit 932e49579b.
2023-10-30 09:53:19 -07:00
Raymond Zhao 932e49579b Separate Settings editor open and search steps (#196866) 2023-10-30 07:50:27 -07:00
Connor Peet c2a6932e9e eng: onboard to the extension test runner (#195570)
* eng: onboard to the extension test runner

Adds a `.vscode-test.js` file that uses the new extension test CLI to
run tests. Also, onboards the markdown-language-features as the first
built-in extension to use it.

With the `ms-vscode.extension-test-runner` extension installed, the
markdown-language-features' tests can be run and debugged easily in
the UI :)

* fixup
2023-10-13 13:11:05 -07:00