Skip to content

Commit 77fe7be

Browse files
committed
Try to fix backend failure test by explicit disable/enable
1 parent b406a82 commit 77fe7be

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

atest/04_Interface/BackendFailure.robot

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
*** Settings ***
22
Resource ../Keywords.resource
33

4-
Suite Setup Setup Server and Browser server_extension_enabled=${False}
5-
Suite Teardown Setup Server and Browser server_extension_enabled=${True}
4+
Suite Setup Setup Missing Extension Test
5+
Suite Teardown Teardown Missing Extension Test
66

77

88
*** Variables ***
@@ -19,3 +19,12 @@ Handles Server Extension Failure
1919
Accept Default Dialog Option
2020
Page Should Not Contain Element ${POPOVER}
2121
[Teardown] Clean Up After Working With File Python.ipynb
22+
23+
24+
*** Keywords ***
25+
Setup Missing Extension Test
26+
Set Server Extension State enabled=${False}
27+
Setup Server and Browser
28+
29+
Teardown Missing Extension Test
30+
Set Server Extension State enabled=${True}

atest/Keywords.resource

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ Library ./config.py
1212

1313
*** Keywords ***
1414
Setup Server and Browser
15-
[Arguments] ${server_extension_enabled}=${True}
1615
Initialize Global Variables
17-
Create Notebok Server Config ${server_extension_enabled}
16+
Create Notebok Server Config
1817
Initialize User Settings
1918
${server} = Start Process jupyter-lab
2019
... cwd=${NOTEBOOK DIR}
@@ -38,7 +37,6 @@ Initialize Global Variables
3837

3938
Create Notebok Server Config
4039
[Documentation] Copies in notebook server config file and updates accordingly
41-
[Arguments] ${server_extension_enabled}=${True}
4240
${conf} = Set Variable ${NOTEBOOK DIR}${/}${JPSERVER CONF JSON}
4341
Set Environment Variable
4442
... name=JUPYTER_CONFIG_DIR
@@ -57,19 +55,18 @@ Create Notebok Server Config
5755
Update Jupyter Config ${conf} LabApp
5856
... user_settings_dir=${SETTINGS DIR}
5957
... workspaces_dir=${WORKSPACES DIR}
60-
# should be automatically enabled, so do not enable manually:
61-
IF not ${server_extension_enabled}
62-
Set Server Extension State ${conf} enabled=${server_extension_enabled}
63-
END
6458
Update Jupyter Config ${conf} LanguageServerManager
6559
... extra_node_roots=@{extra_node_roots}
6660

6761
Set Server Extension State
68-
[Arguments] ${conf} ${enabled}=${True}
69-
${extension_state} = Create Dictionary enabled=${enabled}
70-
${extensions} = Create Dictionary jupyter_lsp=${extension_state}
71-
Update Jupyter Config ${conf} LabApp
72-
... jpserver_extensions=${extensions}
62+
[Arguments] ${enabled}=${True}
63+
IF ${enabled}
64+
Run Process jupyter server extension enable jupyter_lsp
65+
... shell=yes
66+
ELSE
67+
Run Process jupyter server extension disable jupyter_lsp
68+
... shell=yes
69+
END
7370

7471
Read Page Config
7572
${script} = Get Element Attribute id:jupyter-config-data innerHTML

0 commit comments

Comments
 (0)