Skip to content

Commit

Permalink
Fixes the conditions for GAE CI in PR and on main, add timeout for te…
Browse files Browse the repository at this point in the history
…st_java_app.py (#2148)

* Fixes the conditions for GAE CI in PR and on main, add timeout for test_java_app.py.
* Add timeout arguments.

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
sighingnow committed Oct 19, 2022
1 parent 998e361 commit 3220a7f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gae-dummy.yml
Expand Up @@ -8,6 +8,7 @@ on:
- '**'
- '!analytical_engine/**'
- '!.github/workflows/gae.yml'
- '!coordinator/gscoordinator/template/CMakeLists.template' # to verify whether java app can be successfully built when CMakeLists.template changes.
- 'analytical_engine/**.md'

concurrency:
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/gae.yml
Expand Up @@ -6,16 +6,11 @@ on:
push:
branches:
- main
paths-ignore:
- 'CONTRIBUTORS'
- 'LICENSE'
- 'NOTICE.txt'
- '**.md'
- '**.rst'
- 'docs/**'
- 'demo/**'
- 'scripts/**'
- 'tutorials/**'
paths:
- 'analytical_engine/**'
- '.github/workflows/gae.yml'
- 'coordinator/gscoordinator/template/CMakeLists.template' # to verify whether java app can be successfully built when CMakeLists.template changes.
- '!analytical_engine/**.md'
pull_request:
branches:
- main
Expand Down
7 changes: 7 additions & 0 deletions python/graphscope/tests/unittest/test_java_app.py
Expand Up @@ -68,6 +68,7 @@ def non_exist_java_class():
os.environ.get("RUN_JAVA_TESTS") != "ON",
reason="Java SDK is disabled, skip this test.",
)
@pytest.mark.timeout(3600)
def test_load_non_existing_jar(
not_exist_jar, projected_graph_sssp_class, non_exist_java_class
):
Expand All @@ -81,6 +82,7 @@ def test_load_non_existing_jar(
os.environ.get("RUN_JAVA_TESTS") != "ON",
reason="Java SDK is disabled, skip this test.",
)
@pytest.mark.timeout(3600)
def test_load_not_a_jar(not_jar_file, projected_graph_sssp_class, non_exist_java_class):
with pytest.raises(KeyError):
sssp = JavaApp(not_jar_file, projected_graph_sssp_class)
Expand All @@ -92,6 +94,7 @@ def test_load_not_a_jar(not_jar_file, projected_graph_sssp_class, non_exist_java
os.environ.get("RUN_JAVA_TESTS") != "ON",
reason="Java SDK is disabled, skip this test.",
)
@pytest.mark.timeout(3600)
def test_load_gar_file(a_gar_file, projected_graph_sssp_class, non_exist_java_class):
with pytest.raises(KeyError):
sssp = JavaApp(a_gar_file, projected_graph_sssp_class)
Expand All @@ -103,6 +106,7 @@ def test_load_gar_file(a_gar_file, projected_graph_sssp_class, non_exist_java_cl
os.environ.get("RUN_JAVA_TESTS") != "ON",
reason="Java SDK is disabled, skip this test.",
)
@pytest.mark.timeout(3600)
def test_load_empty_jar(empty_jar, projected_graph_sssp_class, non_exist_java_class):
with pytest.raises(KeyError):
sssp = JavaApp(empty_jar, projected_graph_sssp_class)
Expand All @@ -114,6 +118,7 @@ def test_load_empty_jar(empty_jar, projected_graph_sssp_class, non_exist_java_cl
os.environ.get("RUN_JAVA_TESTS") != "ON",
reason="Java SDK is disabled, skip this test.",
)
@pytest.mark.timeout(3600)
def test_load_correct_jar(projected_graph_sssp_class, demo_jar):
sssp = JavaApp(demo_jar, projected_graph_sssp_class)

Expand All @@ -122,6 +127,7 @@ def test_load_correct_jar(projected_graph_sssp_class, demo_jar):
os.environ.get("RUN_JAVA_TESTS") != "ON",
reason="Java SDK is disabled, skip this test.",
)
@pytest.mark.timeout(3600)
def test_sssp_property_vertex_data(
demo_jar,
graphscope_session,
Expand Down Expand Up @@ -151,6 +157,7 @@ def projected_p2p_graph_loaded_by_giraph(
os.environ.get("RUN_JAVA_TESTS") != "ON",
reason="Java SDK is disabled, skip this test.",
)
@pytest.mark.timeout(3600)
def test_giraph_app(
demo_jar,
graphscope_session,
Expand Down

0 comments on commit 3220a7f

Please sign in to comment.