Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

used create-next-app in template; remove old draft test

0diva76ce3f6f23e
diff --git a/packages/js-sdk/tests/integration/stress.test.ts b/packages/js-sdk/tests/integration/stress.test.ts
index 7f2e3bd78..69da1472d 100644
--- a/packages/js-sdk/tests/integration/stress.test.ts
+++ b/packages/js-sdk/tests/integration/stress.test.ts
@@ -1,7 +1,7 @@
import { test } from 'vitest'
import Sandbox from '../../src/index.js'
-import { wait, isIntegrationTest } from '../setup.js'
+import { isIntegrationTest, wait } from '../setup.js'
const heavyArray = new ArrayBuffer(256 * 1024 * 1024) // 256 MiB = 256 * 1024 * 1024 bytes
const view = new Uint8Array(heavyArray)
@@ -33,46 +33,6 @@ test.skipIf(!isIntegrationTest)(
}
)
-test.skipIf(!isIntegrationTest)('stress network ingress', async ({}) => {
- const promises: Array<Promise<string | void>> = []
-
- for (let i = 0; i < sanboxCount; i++) {
- promises.push(
- Sandbox.create(integrationTestTemplate, { timeoutMs: 60 }).then((sbx) => {
- console.log('created sandbox', sbx.sandboxId)
- sbx.files
- .write('heavy-file', heavyArray)
- .then(() => {
- sbx.commands.run('python -m http.server 8000', { background: true })
- })
- .then(() => {
- new Promise((resolve, reject) => {
- try {
- resolve(sbx.getHost(8000))
- } catch (e) {
- console.error('error getting sbx host', e)
- reject(e)
- }
- }).then((host) => {
- const url = `https://${host}`
- console.log('fetching url', url)
- fetch(url)
- })
-
- try {
- sbx.kill()
- } catch (e) {
- console.error('error killing sbx', e)
- }
- })
- })
- )
- }
-
- await wait(10_000)
- await Promise.all(promises)
-})
-
test.skipIf(!isIntegrationTest)('stress requests to nextjs app', async ({}) => {
const hostPromises: Array<Promise<string | void>> = []
diff --git a/packages/js-sdk/tests/integration/template/e2b.Dockerfile b/packages/js-sdk/tests/integration/template/e2b.Dockerfile
index 65ceb7d65..2284ca7d3 100644
--- a/packages/js-sdk/tests/integration/template/e2b.Dockerfile
+++ b/packages/js-sdk/tests/integration/template/e2b.Dockerfile
@@ -1,7 +1,7 @@
FROM e2bdev/code-interpreter:latest
-# Clone the Next.js app repository
-RUN git clone https://github.com/ezesundayeze/basic-nextjs-app
+# Create a basic Next.js app
+RUN npx -y create-next-app@latest test --yes --ts --use-npm
# Install dependencies
RUN cd basic-nextjs-app && npm install