fix: tests
This commit is contained in:
Родитель
4c7307b1b6
Коммит
41fa0d37f3
|
@ -32,7 +32,7 @@ steps:
|
|||
command: custom
|
||||
verbose: false
|
||||
customCommand: test
|
||||
timeoutInMinutes: 10
|
||||
timeoutInMinutes: 15
|
||||
condition: eq(${{ parameters.runTests }}, true)
|
||||
env:
|
||||
DISPLAY: ':99.0'
|
||||
|
|
|
@ -4,7 +4,7 @@ trigger:
|
|||
|
||||
jobs:
|
||||
- job: macOS
|
||||
timeoutInMinutes: 15
|
||||
timeoutInMinutes: 20
|
||||
pool:
|
||||
vmImage: 'macOS-10.15'
|
||||
steps:
|
||||
|
|
|
@ -373,9 +373,6 @@ export interface ISourceWithMap extends Source {
|
|||
};
|
||||
}
|
||||
|
||||
export const isSourceWithMap = (source: unknown): source is ISourceWithMap =>
|
||||
source instanceof Source && !!source.sourceMap;
|
||||
|
||||
/**
|
||||
* A Source generated from a sourcemap. For example, a TypeScript input file
|
||||
* discovered from its compiled JavaScript code.
|
||||
|
@ -387,6 +384,9 @@ export class SourceFromMap extends Source {
|
|||
public readonly compiledToSourceUrl = new Map<ISourceWithMap, string>();
|
||||
}
|
||||
|
||||
export const isSourceWithMap = (source: unknown): source is ISourceWithMap =>
|
||||
source instanceof Source && !!source.sourceMap;
|
||||
|
||||
export interface IPreferredUiLocation extends IUiLocation {
|
||||
isMapped: boolean;
|
||||
unmappedReason?: UnmappedReason;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import { ILogger } from '../common/logging';
|
||||
import { Duplex, Readable, Writable } from 'stream';
|
||||
import { RawPipeTransport } from './rawPipeTransport';
|
||||
import { createGzip, createGunzip, Gzip } from 'zlib';
|
||||
import { createGzip, createGunzip, Gzip, constants } from 'zlib';
|
||||
|
||||
export class GzipPipeTransport extends RawPipeTransport {
|
||||
constructor(logger: ILogger, socket: Duplex);
|
||||
|
@ -20,13 +20,13 @@ export class GzipPipeTransport extends RawPipeTransport {
|
|||
*/
|
||||
public send(message: string) {
|
||||
super.send(message);
|
||||
(this.pipeWrite as Gzip).flush(2 /* Z_SYNC_FLUSH */);
|
||||
(this.pipeWrite as Gzip).flush(constants.Z_SYNC_FLUSH);
|
||||
}
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
protected beforeClose() {
|
||||
(this.pipeWrite as Gzip).flush(2 /* Z_FINISH */);
|
||||
(this.pipeWrite as Gzip).flush(constants.Z_FINISH);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,8 +26,11 @@ export class RawPipeTransport implements ITransport {
|
|||
return;
|
||||
}
|
||||
|
||||
this.beforeClose();
|
||||
this.streams.read.removeAllListeners();
|
||||
this.streams.read.destroy();
|
||||
// destroy pipeRead, not streams.read, since that will cause any buffered
|
||||
// data left in the `split()` transform to error when written.
|
||||
this.pipeRead?.destroy();
|
||||
this.streams.write.removeListener('end', this.onceEnded);
|
||||
this.streams.write.removeListener('error', this.onWriteError);
|
||||
this.streams.write.end();
|
||||
|
|
Загрузка…
Ссылка в новой задаче