File tree Expand file tree Collapse file tree
packages/js-sdk/tests/integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,20 @@ const nextConfig = {
8282 ] ,
8383 }
8484 } ,
85+ async redirects ( ) {
86+ return [
87+ {
88+ source : '/docs/sandbox-templates/overview' ,
89+ destination : '/docs/sandbox-template' ,
90+ permanent : true ,
91+ } ,
92+ {
93+ source : '/docs/sandbox-templates' ,
94+ destination : '/docs/sandbox-template' ,
95+ permanent : true ,
96+ } ,
97+ ]
98+ } ,
8599}
86100
87101export default withSearch (
Original file line number Diff line number Diff line change @@ -9,9 +9,36 @@ for (let i = 0; i < view.length; i++) {
99 view [ i ] = Math . floor ( Math . random ( ) * 256 )
1010}
1111
12- const integrationTestTemplate = 'integration-test-v1 '
12+ const integrationTestTemplate = 'base '
1313const sanboxCount = 10
1414
15+ test . skipIf ( ! isIntegrationTest ) (
16+ 'stress test sandbox spawns in batches' ,
17+ async ( ) => {
18+ const TOTAL_COUNT = 500
19+ const BATCH_SIZE = 50
20+
21+ for ( let i = 0 ; i < TOTAL_COUNT ; i += BATCH_SIZE ) {
22+ const promises : Array < Promise < Sandbox > > = [ ]
23+ for ( let j = 0 ; j < BATCH_SIZE ; j ++ ) {
24+ const sbx = Sandbox . create ( integrationTestTemplate , {
25+ timeoutMs : 30_000 ,
26+ } )
27+ promises . push ( sbx )
28+ }
29+ const res = await Promise . all ( promises )
30+ for ( const sbx of res ) {
31+ console . log ( sbx . sandboxId )
32+ }
33+ await wait ( 1_000 )
34+ }
35+ }
36+ )
37+
38+ if ( process . env . NODE_ENV === 'development' ) {
39+ process . exit ( 0 )
40+ }
41+
1542test . skipIf ( ! isIntegrationTest ) (
1643 'stress test heavy file writes and reads' ,
1744 async ( ) => {
You can’t perform that action at this time.
0 commit comments