dimas-b commented on code in PR #6:
URL: https://github.com/apache/polaris-tools/pull/6#discussion_r2049628392
##########
benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/CreateTreeDataset.scala:
##########
@@ -64,11 +67,31 @@ class CreateTreeDataset extends Simulation {
private val createdViews = new AtomicInteger()
//
--------------------------------------------------------------------------------
- // Workload: Authenticate and store the access token for later use
+ // Authentication related workloads:
+ // * Authenticate and store the access token for later use every minute
+ // * Wait for an OAuth token to be available
+ // * Stop the token refresh loop
//
--------------------------------------------------------------------------------
- val authenticate: ScenarioBuilder = scenario("Authenticate using the OAuth2
REST API endpoint")
- .feed(authenticationActions.feeder())
- .exec(authenticationActions.authenticateAndSaveAccessToken)
+ val continuouslyRefreshOauthToken: ScenarioBuilder =
+ scenario("Authenticate every minute using the Iceberg REST API")
+ .asLongAs(_ => shouldRefreshToken.get())(
+ feed(authenticationActions.feeder())
+ .exec(authenticationActions.authenticateAndSaveAccessToken)
+ .pause(1.minute)
Review Comment:
nit: Could we make this configurable too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]