Skip to content

Commit 3f5479f

Browse files
Fix label text test conflicts (#3169)
Fixes the test flake observed in https://github.com/Kitware/CDash/actions/runs/18207382087/job/51840810691.
1 parent 922ebb9 commit 3f5479f

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

tests/Feature/GraphQL/BuildTypeTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,20 +625,20 @@ public function testLabelFilters(): void
625625
]);
626626

627627
$label1 = $build->labels()->create([
628-
'text' => 'text1',
628+
'text' => Str::uuid()->toString(),
629629
]);
630630

631631
$label2 = $build->labels()->create([
632-
'text' => 'text2',
632+
'text' => Str::uuid()->toString(),
633633
]);
634634

635635
$this->graphQL('
636-
query build($id: ID) {
636+
query build($id: ID, $labeltext: String!) {
637637
build(id: $id) {
638638
labels(
639639
filters: {
640640
eq: {
641-
text: "text1"
641+
text: $labeltext
642642
}
643643
}
644644
){
@@ -653,6 +653,7 @@ public function testLabelFilters(): void
653653
}
654654
', [
655655
'id' => $build->id,
656+
'labeltext' => $label1->text,
656657
])->assertExactJson([
657658
'data' => [
658659
'build' => [

tests/Feature/GraphQL/LabelTypeTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,20 @@ public function testLabelFilters(): void
9393
]);
9494

9595
$this->labels['label1'] = $build->labels()->create([
96-
'text' => 'text1',
96+
'text' => Str::uuid()->toString(),
9797
]);
9898

9999
$this->labels['label2'] = $build->labels()->create([
100-
'text' => 'text2',
100+
'text' => Str::uuid()->toString(),
101101
]);
102102

103103
$this->graphQL('
104-
query build($id: ID) {
104+
query build($id: ID, $labeltext: String!) {
105105
build(id: $id) {
106106
labels(
107107
filters: {
108108
eq: {
109-
text: "text1"
109+
text: $labeltext
110110
}
111111
}
112112
){
@@ -121,6 +121,7 @@ public function testLabelFilters(): void
121121
}
122122
', [
123123
'id' => $build->id,
124+
'labeltext' => $this->labels['label1']->text,
124125
])->assertExactJson([
125126
'data' => [
126127
'build' => [

0 commit comments

Comments
 (0)