type borrowingTestConstraints … // TestBorrowing tests borrowing of concurrency between priority levels. // It runs two scenarios, one where the borrowing hits the limit on // lendable concurrency and one where the borrowing hits the limit on // borrowing of concurrency. // Both scenarios are the same except for the limits. // The test defines two priority levels, identified as "flows" 0 and 1. // Both priority levels have a nominal concurrency limit of 12. // The test maintains 24 concurrent clients for priority level 0 // and 6 for level 1, // using an exec func that simply sleeps for 250 ms, for // 25 seconds. The first 10 seconds of behavior are ignored, allowing // the borrowing to start at any point during that time. The test // continues for another 15 seconds, and checks that the delivered // concurrency is about 16 for flow 0 and 6 for flow 1. func TestBorrowing(t *testing.T) { … } type testUser … func (tu testUser) GetName() string { … } func (tu testUser) GetUID() string { … } func (tu testUser) GetGroups() []string { … } func (tu testUser) GetExtra() map[string][]string { … }