@@ -31,9 +31,11 @@ import { createCouchbaseTest, getRandomId } from '@cbjsdev/vitest';
3131
3232import { serverSupportsFeatures } from '../utils/serverFeature.js' ;
3333
34+ const testTimeout = 45_000 ;
35+
3436describe
3537 . runIf ( serverSupportsFeatures ( ServerFeatures . Collections , ServerFeatures . Eventing ) )
36- . sequential ( 'eventing' , { timeout : 30_000 } , async function ( ) {
38+ . sequential ( 'eventing' , { timeout : testTimeout } , async function ( ) {
3739 const eventingFunctionName = getRandomId ( ) ;
3840
3941 const test = await createCouchbaseTest ( async ( { useBucket, useCollection } ) => {
@@ -139,7 +141,7 @@ describe
139141 const testFn = eventingFunctions . find ( ( f ) => f . name === testFnName ) ;
140142 expect ( testFn ) . toBeDefined ( ) ;
141143 } ,
142- { timeout : 30_000 }
144+ { timeout : testTimeout }
143145 ) ;
144146 } ) ;
145147
@@ -156,7 +158,7 @@ describe
156158 const testFnStatus = statuses . functions . find ( ( f ) => f . name === testFnName ) ;
157159 expect ( testFnStatus ) . toBeDefined ( ) ;
158160 } ,
159- { timeout : 30_000 }
161+ { timeout : testTimeout }
160162 ) ;
161163 } ) ;
162164
@@ -167,7 +169,7 @@ describe
167169 } ) {
168170 await expect (
169171 waitForEventingFunction ( apiConfig , testFnName , 'undeployed' , {
170- timeout : 30_000 ,
172+ timeout : testTimeout ,
171173 } )
172174 ) . resolves . toBeUndefined ( ) ;
173175 } ) ;
@@ -180,7 +182,9 @@ describe
180182 } ) {
181183 await serverTestContext . cluster . eventingFunctions ( ) . deployFunction ( testFnName ) ;
182184 await expect (
183- waitForEventingFunction ( apiConfig , testFnName , 'deployed' , { timeout : 30_000 } )
185+ waitForEventingFunction ( apiConfig , testFnName , 'deployed' , {
186+ timeout : testTimeout ,
187+ } )
184188 ) . resolves . toBeUndefined ( ) ;
185189 } ) ;
186190
@@ -192,7 +196,7 @@ describe
192196 } ) {
193197 await serverTestContext . cluster . eventingFunctions ( ) . pauseFunction ( testFnName ) ;
194198 await expect (
195- waitForEventingFunction ( apiConfig , testFnName , 'paused' , { timeout : 30_000 } )
199+ waitForEventingFunction ( apiConfig , testFnName , 'paused' , { timeout : testTimeout } )
196200 ) . resolves . toBeUndefined ( ) ;
197201 } ) ;
198202
@@ -204,7 +208,9 @@ describe
204208 } ) {
205209 await serverTestContext . cluster . eventingFunctions ( ) . resumeFunction ( testFnName ) ;
206210 await expect (
207- waitForEventingFunction ( apiConfig , testFnName , 'deployed' , { timeout : 30_000 } )
211+ waitForEventingFunction ( apiConfig , testFnName , 'deployed' , {
212+ timeout : testTimeout ,
213+ } )
208214 ) . resolves . toBeUndefined ( ) ;
209215 } ) ;
210216
@@ -217,7 +223,7 @@ describe
217223 await serverTestContext . cluster . eventingFunctions ( ) . undeployFunction ( testFnName ) ;
218224 await expect (
219225 waitForEventingFunction ( apiConfig , testFnName , 'undeployed' , {
220- timeout : 30_000 ,
226+ timeout : testTimeout ,
221227 } )
222228 ) . resolves . toBeUndefined ( ) ;
223229 } ) ;
@@ -230,7 +236,7 @@ describe
230236 await serverTestContext . cluster . eventingFunctions ( ) . dropFunction ( testFnName ) ;
231237
232238 await waitForEventingFunction ( apiConfig , testFnName , {
233- timeout : 30_000 ,
239+ timeout : testTimeout ,
234240 expectMissing : true ,
235241 } ) ;
236242 } ) ;
0 commit comments