@@ -22,8 +22,6 @@ import { addMockData } from '../testHelpersCore';
22
22
import { waitTimeForUIToUpdate } from './helpers' ;
23
23
import { openNotebook } from './notebookHelpers' ;
24
24
import { NotebookEditorUI } from './notebookUi' ;
25
- import { TestRecorder } from './recorder' ;
26
- import { WebServer } from './webBrowserPanel' ;
27
25
28
26
const sanitize = require ( 'sanitize-filename' ) ;
29
27
// Include default timeout.
@@ -41,45 +39,18 @@ use(chaiAsPromised);
41
39
// These are UI tests, hence nothing to do with platforms.
42
40
UseCustomEditor . enabled = useCustomEditorApi ;
43
41
this . timeout ( 30_000 ) ; // UI Tests, need time to start jupyter.
44
- this . retries ( 3 ) ; // UI Tests can be flaky.
42
+ if ( ! process . env . VSCODE_PYTHON_ROLLING ) {
43
+ // Skip all tests unless using real jupyter
44
+ this . skip ( ) ;
45
+ }
45
46
} ) ;
46
- let testRecorder : TestRecorder ;
47
- setup ( async function ( ) {
48
- const testFileName = path . join (
49
- EXTENSION_ROOT_DIR ,
50
- `src/test/datascience/uiTests/recordedTests/test_log_${ sanitize ( this . currentTest ?. title ) } .log`
51
- ) ;
47
+ setup ( async ( ) => {
52
48
UseCustomEditor . enabled = useCustomEditorApi ;
53
49
ioc = new DataScienceIocContainer ( true ) ;
54
50
ioc . registerDataScienceTypes ( useCustomEditorApi ) ;
55
-
56
- // Use mode = 'replay' for testing with fake jupyter and fake messages (play back recorded messages sent/received from/to UI).
57
- // Use mode = 'record' to record messages to be played back for running tests without real jupyter.
58
- // Use this locally so you can generate the test logs and check in with PR.
59
- // Use mode = 'skip' to run tests without recording or playing (with real jupyter and on CI.)
60
- let mode : 'skip' | 'replay' | 'record' = 'skip' ;
61
- if ( process . env . VSCODE_PYTHON_ROLLING ) {
62
- // Definitely running tests on CI/local machine with real jupyter.
63
- mode = 'skip' ;
64
- } else if ( ! process . env . VSCODE_PYTHON_ROLLING ) {
65
- // Definitely running tests without real jupyter.
66
- // Hence use fake messages.
67
- mode = 'replay' ;
68
- }
69
- // Hardcode value to `record` to re-generate or generate new test logs.
70
- // mode = 'record';
71
- if ( mode === 'replay' && ! ( await fs . pathExists ( testFileName ) ) ) {
72
- return this . skip ( ) ;
73
- }
74
- WebServer . create = ( ) => {
75
- const server = new WebServer ( ) ;
76
- testRecorder = new TestRecorder ( server , mode , testFileName ) ;
77
- return server ;
78
- } ;
79
51
await ioc . activate ( ) ;
80
52
} ) ;
81
53
teardown ( async ( ) => {
82
- await testRecorder . end ( ) ;
83
54
sinon . restore ( ) ;
84
55
mockedVSCodeNamespaces . window ?. reset ( ) ;
85
56
for ( const disposable of disposables ) {
0 commit comments