Iterating over all the records in a feeder & "syncing" up scenarios

Two separate questions:

  1. I have a CSV feeder. I want to make sure that we go over the entire file once. Is there a way to ensure this? Best I came up so far is repeat(totalRecords) { … }, and I have to calculate totalRecords manually (i.e. read the file and count lines), since the FeederBuilder returned by csv does not have a way of reporting the total size. Is there a better way to achieve this?

  2. In order to authenticate we have a separate scenario that sets a shared auth token every X seconds, and then we access this token from our other scenarios. Is there a way to run that scenario until another scenario finishes? For scenarios that run for a certain amount of time it’s easy to just pass the same duration to both and use during. But for this particular scenario that does a certain number of requests regardless of how long it takes, I can’t pass a duration to the authentication scenario.

I tried using forever but then that one keeps running, well, forever (predictably :)). Is there a way of coordinating two scenarios like this?