File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed
Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -81,18 +81,28 @@ After(async function afterMethod(testCase) {
8181 }
8282
8383 for ( const config of tripleStoreConfiguration ) {
84+ // Skip if tripleStore module is not defined
85+ if ( ! config ?. modules ?. tripleStore ) {
86+ continue ;
87+ }
88+
8489 promises . push ( ( async ( ) => {
85- const tripleStoreModuleManager = new TripleStoreModuleManager ( {
86- config,
87- logger : this . logger ,
88- } ) ;
89- await tripleStoreModuleManager . initialize ( ) ;
90- for ( const impl of tripleStoreModuleManager . getImplementationNames ( ) ) {
91- const { tripleStoreConfig } = tripleStoreModuleManager . getImplementation ( impl ) ;
92- for ( const repo of Object . keys ( tripleStoreConfig . repositories ) ) {
93- this . logger . log ( '🗑 Removing triple store repository:' , repo ) ;
94- await tripleStoreModuleManager . deleteRepository ( impl , repo ) ;
90+ try {
91+ const tripleStoreModuleManager = new TripleStoreModuleManager ( {
92+ config,
93+ logger : this . logger ,
94+ } ) ;
95+ await tripleStoreModuleManager . initialize ( ) ;
96+ for ( const impl of tripleStoreModuleManager . getImplementationNames ( ) ) {
97+ const { tripleStoreConfig } = tripleStoreModuleManager . getImplementation ( impl ) ;
98+ for ( const repo of Object . keys ( tripleStoreConfig . repositories ) ) {
99+ this . logger . log ( '🗑 Removing triple store repository:' , repo ) ;
100+ await tripleStoreModuleManager . deleteRepository ( impl , repo ) ;
101+ }
95102 }
103+ } catch ( error ) {
104+ // Log but don't fail cleanup if tripleStore cleanup fails
105+ this . logger . warn ( `⚠️ Could not clean up tripleStore: ${ error . message } ` ) ;
96106 }
97107 } ) ( ) ) ;
98108 }
You can’t perform that action at this time.
0 commit comments