File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# Server Configuration
66# ============================================================================
77
8- # Port for HTTP/HTTPS server (default: 3001 )
9- PORT = 3001
8+ # Port for HTTP/HTTPS server (default: 3000 )
9+ PORT = 3000
1010
1111# Host to bind to (default: 0.0.0.0 for all interfaces)
1212HOST = 0.0.0.0
Original file line number Diff line number Diff line change 99 extractToolData ,
1010 generateTestResourceName ,
1111 isValidLMId ,
12+ retry ,
1213 waitForIndexing ,
1314} from '../utils/testHelpers.js' ;
1415import {
@@ -253,12 +254,28 @@ describe('lm_device_group', () => {
253254 } ) ;
254255 createdGroupIds . push ( group1 . id , group2 . id ) ;
255256
256- // Wait for groups to be indexed before filtering
257- await waitForIndexing ( ) ;
257+ // Exact names + OR avoids wildcard quirks; poll until list matches (LM search can lag create).
258+ const batchFilter = `name:"${ prefix } -1"||name:"${ prefix } -2"` ;
259+ await retry (
260+ async ( ) => {
261+ const check = await client . callTool ( 'lm_device_group' , {
262+ operation : 'list' ,
263+ filter : batchFilter ,
264+ size : 50 ,
265+ autoPaginate : false ,
266+ } ) ;
267+ assertToolSuccess ( check ) ;
268+ const checkData = extractToolData < { items : Array < { id : number } > } > ( check ) ;
269+ if ( ( checkData . items ?. length ?? 0 ) < 2 ) {
270+ throw new Error ( 'device groups not yet visible to list/filter' ) ;
271+ }
272+ } ,
273+ { maxAttempts : 15 , delayMs : 2000 }
274+ ) ;
258275
259276 const result = await client . callTool ( 'lm_device_group' , {
260277 operation : 'update' ,
261- filter : `name:" ${ prefix } *"` ,
278+ filter : batchFilter ,
262279 updates : {
263280 description : 'Batch updated' ,
264281 } ,
You can’t perform that action at this time.
0 commit comments