Skip to content

Commit ce584d7

Browse files
committed
disable reconnect and systemd tests on debug
1 parent 0ada681 commit ce584d7

6 files changed

Lines changed: 19 additions & 5 deletions

File tree

js/tests/reconnect.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { expect } from 'vitest'
22

33
import { Sandbox } from '../src'
4-
import { sandboxTest } from './setup'
4+
import { isDebug, sandboxTest } from './setup'
55

6-
sandboxTest('reconnect', async ({ sandbox }) => {
6+
sandboxTest.skipIf(isDebug)('reconnect', async ({ sandbox }) => {
77
sandbox = await Sandbox.connect(sandbox.sandboxId)
88

99
const result = await sandbox.runCode('x =1; x')

js/tests/systemd.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'vitest'
2-
import { sandboxTest, wait } from './setup'
2+
import { isDebug, sandboxTest, wait } from './setup'
33

44
async function waitForHealth(sandbox: any, maxRetries = 10, intervalMs = 100) {
55
for (let i = 0; i < maxRetries; i++) {
@@ -18,7 +18,7 @@ async function waitForHealth(sandbox: any, maxRetries = 10, intervalMs = 100) {
1818
return false
1919
}
2020

21-
sandboxTest('restart after jupyter kill', async ({ sandbox }) => {
21+
sandboxTest.skipIf(isDebug)('restart after jupyter kill', async ({ sandbox }) => {
2222
// Verify health is up initially
2323
const initialHealth = await waitForHealth(sandbox)
2424
expect(initialHealth).toBe(true)
@@ -43,7 +43,7 @@ sandboxTest('restart after jupyter kill', async ({ sandbox }) => {
4343
expect(result.text).toEqual('1')
4444
})
4545

46-
sandboxTest('restart after code-interpreter kill', async ({ sandbox }) => {
46+
sandboxTest.skipIf(isDebug)('restart after code-interpreter kill', async ({ sandbox }) => {
4747
// Verify health is up initially
4848
const initialHealth = await waitForHealth(sandbox)
4949
expect(initialHealth).toBe(true)

python/tests/async/test_async_reconnect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import pytest
2+
13
from e2b_code_interpreter.code_interpreter_async import AsyncSandbox
24

35

6+
@pytest.mark.skip_debug
47
async def test_reconnect(async_sandbox: AsyncSandbox):
58
sandbox_id = async_sandbox.sandbox_id
69

python/tests/async/test_async_systemd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import asyncio
22

3+
import pytest
4+
35
from e2b_code_interpreter.code_interpreter_async import AsyncSandbox
46

57

@@ -17,6 +19,7 @@ async def wait_for_health(sandbox: AsyncSandbox, max_retries=10, interval_ms=100
1719
return False
1820

1921

22+
@pytest.mark.skip_debug
2023
async def test_restart_after_jupyter_kill(async_sandbox: AsyncSandbox):
2124
# Verify health is up initially
2225
assert await wait_for_health(async_sandbox)
@@ -39,6 +42,7 @@ async def test_restart_after_jupyter_kill(async_sandbox: AsyncSandbox):
3942
assert result.text == "1"
4043

4144

45+
@pytest.mark.skip_debug
4246
async def test_restart_after_code_interpreter_kill(async_sandbox: AsyncSandbox):
4347
# Verify health is up initially
4448
assert await wait_for_health(async_sandbox)

python/tests/sync/test_reconnect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import pytest
2+
13
from e2b_code_interpreter.code_interpreter_sync import Sandbox
24

35

6+
@pytest.mark.skip_debug
47
def test_reconnect(sandbox: Sandbox):
58
sandbox_id = sandbox.sandbox_id
69

python/tests/sync/test_systemd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import time
22

3+
import pytest
4+
35
from e2b_code_interpreter.code_interpreter_sync import Sandbox
46

57

@@ -17,6 +19,7 @@ def wait_for_health(sandbox: Sandbox, max_retries=10, interval_ms=100):
1719
return False
1820

1921

22+
@pytest.mark.skip_debug
2023
def test_restart_after_jupyter_kill(sandbox: Sandbox):
2124
# Verify health is up initially
2225
assert wait_for_health(sandbox)
@@ -37,6 +40,7 @@ def test_restart_after_jupyter_kill(sandbox: Sandbox):
3740
assert result.text == "1"
3841

3942

43+
@pytest.mark.skip_debug
4044
def test_restart_after_code_interpreter_kill(sandbox: Sandbox):
4145
# Verify health is up initially
4246
assert wait_for_health(sandbox)

0 commit comments

Comments
 (0)