CE-1887 expose to reset additional endpointGroups / javalinRoutes

This commit is contained in:
2024-10-21 14:20:13 -05:00
parent a5051e559a
commit 93ab08cbf1
3 changed files with 14 additions and 0 deletions

View File

@ -78,6 +78,7 @@ class QJavalinApiHandlerPermissionsTest extends BaseTest
}
qJavalinImplementation = new QJavalinImplementation(qInstance);
qJavalinImplementation.clearJavalinRoutes();
EndpointGroup routes = new QJavalinApiHandler(qInstance).getRoutes();
qJavalinImplementation.addJavalinRoutes(routes);
qJavalinImplementation.startJavalinServer(PORT);

View File

@ -112,6 +112,7 @@ class QJavalinApiHandlerTest extends BaseTest
.withInitialVersion(TestUtils.V2022_Q4))));
qJavalinImplementation = new QJavalinImplementation(qInstance);
qJavalinImplementation.clearJavalinRoutes();
EndpointGroup routes = new QJavalinApiHandler(qInstance).getRoutes();
qJavalinImplementation.addJavalinRoutes(routes);
qJavalinImplementation.startJavalinServer(PORT);

View File

@ -1955,4 +1955,16 @@ public class QJavalinImplementation
}
endpointGroups.add(routes);
}
/***************************************************************************
** if restarting this class, and you want to re-run addJavalinRoutes, but
** not create duplicates, well, you might want to call this method!
***************************************************************************/
public void clearJavalinRoutes()
{
endpointGroups = null;
}
}