good morning!!!!

Skip to content
Snippets Groups Projects
Commit 1ecab4e3 authored by Garet Halliday's avatar Garet Halliday
Browse files

fix test

parent ee669245
No related branches found
No related tags found
No related merge requests found
Pipeline #71432 failed
...@@ -7,8 +7,6 @@ import ( ...@@ -7,8 +7,6 @@ import (
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"
"gfx.cafe/gfx/pggat/lib/rob"
) )
type ShareTable struct { type ShareTable struct {
...@@ -43,7 +41,7 @@ func testSource(sched *Scheduler, tab *ShareTable, id int, dur time.Duration) { ...@@ -43,7 +41,7 @@ func testSource(sched *Scheduler, tab *ShareTable, id int, dur time.Duration) {
source := uuid.New() source := uuid.New()
sched.AddUser(source) sched.AddUser(source)
for { for {
sink := sched.Acquire(source, rob.SyncModeTryNonBlocking) sink := sched.Acquire(source, 0)
start := time.Now() start := time.Now()
for time.Since(start) < dur { for time.Since(start) < dur {
runtime.Gosched() runtime.Gosched()
...@@ -60,7 +58,7 @@ func testStarver(sched *Scheduler, tab *ShareTable, id int, dur time.Duration) { ...@@ -60,7 +58,7 @@ func testStarver(sched *Scheduler, tab *ShareTable, id int, dur time.Duration) {
sched.AddUser(source) sched.AddUser(source)
defer sched.DeleteUser(source) defer sched.DeleteUser(source)
sink := sched.Acquire(source, rob.SyncModeTryNonBlocking) sink := sched.Acquire(source, 0)
defer sched.Release(sink) defer sched.Release(sink)
start := time.Now() start := time.Now()
for time.Since(start) < dur { for time.Since(start) < dur {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment