fix potential deadlock in test (#9010)
fix potential deadlock in test (#9010)

* fix potential deadlock

Signed-off-by: Shihao Xia <a45f275d95accab80f91e3bb04b2ef4f1b3f39ef@hotmail.com>

* fix deadlock

Signed-off-by: Shihao Xia <a45f275d95accab80f91e3bb04b2ef4f1b3f39ef@hotmail.com>

* Update promql/engine_test.go

Co-authored-by: Ganesh Vernekar <ffbbddbb53863eda030ea9dc8510ee037eb241e2@users.noreply.github.com>
Signed-off-by: Shihao Xia <a45f275d95accab80f91e3bb04b2ef4f1b3f39ef@hotmail.com>

Co-authored-by: Ganesh Vernekar <ffbbddbb53863eda030ea9dc8510ee037eb241e2@users.noreply.github.com>
prometheus/prometheus,keegancsmith/prometheus,prometheus/prometheus,keegancsmith/prometheus,keegancsmith/prometheus,prometheus/prometheus,keegancsmith/prometheus,prometheus/prometheus,prometheus/prometheus,keegancsmith/prometheus