@@ -12,8 +12,8 @@ import testAssetWorkspace from './testAssets/testAssetWorkspace';
1212import { poll , assertWithPoll } from './poll' ;
1313import { EventStream } from '../../src/EventStream' ;
1414import { EventType } from '../../src/omnisharp/EventType' ;
15- import { BaseEvent , OmnisharpProjectDiagnosticStatus } from '../../src/omnisharp/loggingEvents' ;
16- import { DiagnosticStatus } from '../../src/omnisharp/protocol' ;
15+ import { BaseEvent , OmnisharpBackgroundDiagnosticStatus } from '../../src/omnisharp/loggingEvents' ;
16+ import { BackgroundDiagnosticStatus } from '../../src/omnisharp/protocol' ;
1717
1818const chai = require ( 'chai' ) ;
1919chai . use ( require ( 'chai-arrays' ) ) ;
@@ -63,7 +63,7 @@ suite(`ReAnalyze: ${testAssetWorkspace.description}`, function () {
6363 } ) ;
6464
6565 test ( "When interface is manually renamed, then return correct analysis after re-analysis of project" , async function ( ) {
66- let diagnosticStatusEvents = listenEvents < OmnisharpProjectDiagnosticStatus > ( eventStream , EventType . ProjectDiagnosticStatus ) ;
66+ let diagnosticStatusEvents = listenEvents < OmnisharpBackgroundDiagnosticStatus > ( eventStream , EventType . BackgroundDiagnosticStatus ) ;
6767
6868 await vscode . commands . executeCommand ( "vscode.open" , interfaceUri ) ;
6969
@@ -73,7 +73,7 @@ suite(`ReAnalyze: ${testAssetWorkspace.description}`, function () {
7373
7474 await vscode . commands . executeCommand ( 'o.reanalyze.currentProject' , interfaceImplUri ) ;
7575
76- await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === DiagnosticStatus . Ready ) !== undefined ) ;
76+ await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === BackgroundDiagnosticStatus . Finished ) !== undefined ) ;
7777
7878 await assertWithPoll (
7979 ( ) => vscode . languages . getDiagnostics ( interfaceImplUri ) ,
@@ -83,20 +83,20 @@ suite(`ReAnalyze: ${testAssetWorkspace.description}`, function () {
8383 } ) ;
8484
8585 test ( "When re-analyze of project is executed then eventually get notified about them." , async function ( ) {
86- let diagnosticStatusEvents = listenEvents < OmnisharpProjectDiagnosticStatus > ( eventStream , EventType . ProjectDiagnosticStatus ) ;
86+ let diagnosticStatusEvents = listenEvents < OmnisharpBackgroundDiagnosticStatus > ( eventStream , EventType . BackgroundDiagnosticStatus ) ;
8787
8888 await vscode . commands . executeCommand ( 'o.reanalyze.currentProject' , interfaceImplUri ) ;
8989
90- await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === DiagnosticStatus . Processing ) != undefined ) ;
91- await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === DiagnosticStatus . Ready ) != undefined ) ;
90+ await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status !== BackgroundDiagnosticStatus . Finished ) != undefined ) ;
91+ await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === BackgroundDiagnosticStatus . Finished ) != undefined ) ;
9292 } ) ;
9393
9494 test ( "When re-analyze of all projects is executed then eventually get notified about them." , async function ( ) {
95- let diagnosticStatusEvents = listenEvents < OmnisharpProjectDiagnosticStatus > ( eventStream , EventType . ProjectDiagnosticStatus ) ;
95+ let diagnosticStatusEvents = listenEvents < OmnisharpBackgroundDiagnosticStatus > ( eventStream , EventType . BackgroundDiagnosticStatus ) ;
9696
9797 await vscode . commands . executeCommand ( 'o.reanalyze.allProjects' , interfaceImplUri ) ;
9898
99- await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === DiagnosticStatus . Processing ) != undefined ) ;
100- await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === DiagnosticStatus . Ready ) != undefined ) ;
99+ await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status !== BackgroundDiagnosticStatus . Finished ) != undefined ) ;
100+ await poll ( ( ) => diagnosticStatusEvents , 15 * 1000 , 500 , r => r . find ( x => x . message . Status === BackgroundDiagnosticStatus . Finished ) != undefined ) ;
101101 } ) ;
102102} ) ;
0 commit comments