Skip to content

Commit

Permalink
fixed tests due to issue with refactor of runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Jul 26, 2024
1 parent 7c29923 commit 4610178
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void unregisterComponent( Key name ) {
*/
public void loadComponentRegistry() throws IOException {
ServiceLoader
.load( Component.class, runtime.getClass().getClassLoader() )
.load( Component.class, BoxRuntime.class.getClassLoader() )
.stream()
.parallel()
.map( ServiceLoader.Provider::type )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public void registerMemberMethod( Key memberKey, MemberDescriptor descriptor ) {
*/
public void loadGlobalFunctions() throws IOException {
ServiceLoader
.load( BIF.class, runtime.getClass().getClassLoader() )
.load( BIF.class, BoxRuntime.class.getClassLoader() )
.stream()
.parallel()
.map( ServiceLoader.Provider::type )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class BoxCacheProviderTest {
@BeforeAll
static void setup() {
Mockito.when( cacheService.getTaskScheduler() ).thenReturn( executorRecord );
Mockito.when( cacheService.getRuntime() ).thenReturn( Mockito.mock( ortus.boxlang.runtime.BoxRuntime.class ) );

boxCache = new BoxCacheProvider();
boxCache.configure( cacheService, config );
Expand Down

0 comments on commit 4610178

Please sign in to comment.