Skip to content

Commit

Permalink
Remove unwanted test (original issue has been resolved in upstream IP…
Browse files Browse the repository at this point in the history
…yKernel) (#15027)

* Restore tests

* Fixes
  • Loading branch information
DonJayamanne authored Jan 18, 2024
1 parent f2e694e commit 091fc02
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions src/test/datascience/notebook/executionService.vscode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,52 +575,6 @@ suite('Kernel Execution @kernelCore', function () {
)
]);
});
test.skip('Messages from background threads can come in other cell output', async function () {
// Details can be found in notebookUpdater.ts & https://github.com/jupyter/jupyter_client/issues/297
// If you have a background thread in cell 1 & then immediately after that you have a cell 2.
// The background messages (output) from cell one will end up in cell 2.
const cell1 = await notebook.appendCodeCell(
dedent`
import time
import threading
from IPython.display import display
def work():
for i in range(10):
print('iteration %d'%i)
time.sleep(0.1)
def spawn():
thread = threading.Thread(target=work)
thread.start()
time.sleep(0.3)
spawn()
print('main thread started')
`
);
const cell2 = await notebook.appendCodeCell('print("HELLO")');

await Promise.all([
Promise.all(notebook.cells.map((cell) => kernelExecution.executeCell(cell))),
waitForCondition(
() => getTextOutputValues(cell1).includes('main thread started'),
defaultNotebookTestTimeout,
() => `'main thread started' not in output => '${getTextOutputValues(cell1)}'`
),
waitForCondition(
async () => {
const secondCellOutput = getTextOutputValues(cell2);
expect(secondCellOutput).to.include('HELLO');
// The last output from the first cell should end up in the second cell.
expect(secondCellOutput).to.include('iteration 9');
return true;
},
defaultNotebookTestTimeout,
() => `'iteration 9' and 'HELLO' not in second cell Output => '${getTextOutputValues(cell2)}'`
)
]);
});
test('Stderr & stdout outputs should go into separate outputs', async function () {
const cell = await notebook.appendCodeCell(
dedent`
Expand Down

0 comments on commit 091fc02

Please sign in to comment.