Skip to content

Commit 55a1533

Browse files
committed
chore(tests): Fix flaky birdbox:postgresql tests (due to order by same numbers)
1 parent 91e3af6 commit 55a1533

File tree

2 files changed

+40
-40
lines changed

2 files changed

+40
-40
lines changed

packages/cubejs-testing/test/__snapshots__/cli-postgresql.test.ts.snap

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,44 @@ Array [
1616
]
1717
`;
1818

19-
exports[`postgresql HTTP Transport #3 Events.count with Events.type order by Events.count DESC: #3 Events.count with Events.type order by Events.count DESC 1`] = `
19+
exports[`postgresql HTTP Transport #3 Events.count with Events.type order by Events.type DESC: #3 Events.count with Events.type order by Events.type DESC 1`] = `
2020
Array [
21+
Object {
22+
"Events.count": "92",
23+
"Events.type": "WatchEvent",
24+
},
25+
Object {
26+
"Events.count": "2",
27+
"Events.type": "ReleaseEvent",
28+
},
2129
Object {
2230
"Events.count": "513",
2331
"Events.type": "PushEvent",
2432
},
2533
Object {
26-
"Events.count": "120",
27-
"Events.type": "CreateEvent",
34+
"Events.count": "21",
35+
"Events.type": "PullRequestReviewCommentEvent",
2836
},
2937
Object {
30-
"Events.count": "104",
31-
"Events.type": "IssueCommentEvent",
38+
"Events.count": "32",
39+
"Events.type": "PullRequestEvent",
3240
},
3341
Object {
34-
"Events.count": "92",
35-
"Events.type": "WatchEvent",
42+
"Events.count": "1",
43+
"Events.type": "MemberEvent",
3644
},
3745
Object {
3846
"Events.count": "57",
3947
"Events.type": "IssuesEvent",
4048
},
4149
Object {
42-
"Events.count": "32",
43-
"Events.type": "PullRequestEvent",
50+
"Events.count": "104",
51+
"Events.type": "IssueCommentEvent",
4452
},
4553
Object {
4654
"Events.count": "21",
4755
"Events.type": "GollumEvent",
4856
},
49-
Object {
50-
"Events.count": "21",
51-
"Events.type": "PullRequestReviewCommentEvent",
52-
},
5357
Object {
5458
"Events.count": "21",
5559
"Events.type": "ForkEvent",
@@ -59,12 +63,8 @@ Array [
5963
"Events.type": "DeleteEvent",
6064
},
6165
Object {
62-
"Events.count": "2",
63-
"Events.type": "ReleaseEvent",
64-
},
65-
Object {
66-
"Events.count": "1",
67-
"Events.type": "MemberEvent",
66+
"Events.count": "120",
67+
"Events.type": "CreateEvent",
6868
},
6969
Object {
7070
"Events.count": "1",
@@ -186,40 +186,44 @@ Array [
186186
]
187187
`;
188188

189-
exports[`postgresql WS Transport #3 Events.count with Events.type order by Events.count DESC: #3 Events.count with Events.type order by Events.count DESC 1`] = `
189+
exports[`postgresql WS Transport #3 Events.count with Events.type order by Events.type DESC: #3 Events.count with Events.type order by Events.type DESC 1`] = `
190190
Array [
191+
Object {
192+
"Events.count": "92",
193+
"Events.type": "WatchEvent",
194+
},
195+
Object {
196+
"Events.count": "2",
197+
"Events.type": "ReleaseEvent",
198+
},
191199
Object {
192200
"Events.count": "513",
193201
"Events.type": "PushEvent",
194202
},
195203
Object {
196-
"Events.count": "120",
197-
"Events.type": "CreateEvent",
204+
"Events.count": "21",
205+
"Events.type": "PullRequestReviewCommentEvent",
198206
},
199207
Object {
200-
"Events.count": "104",
201-
"Events.type": "IssueCommentEvent",
208+
"Events.count": "32",
209+
"Events.type": "PullRequestEvent",
202210
},
203211
Object {
204-
"Events.count": "92",
205-
"Events.type": "WatchEvent",
212+
"Events.count": "1",
213+
"Events.type": "MemberEvent",
206214
},
207215
Object {
208216
"Events.count": "57",
209217
"Events.type": "IssuesEvent",
210218
},
211219
Object {
212-
"Events.count": "32",
213-
"Events.type": "PullRequestEvent",
220+
"Events.count": "104",
221+
"Events.type": "IssueCommentEvent",
214222
},
215223
Object {
216224
"Events.count": "21",
217225
"Events.type": "GollumEvent",
218226
},
219-
Object {
220-
"Events.count": "21",
221-
"Events.type": "PullRequestReviewCommentEvent",
222-
},
223227
Object {
224228
"Events.count": "21",
225229
"Events.type": "ForkEvent",
@@ -229,12 +233,8 @@ Array [
229233
"Events.type": "DeleteEvent",
230234
},
231235
Object {
232-
"Events.count": "2",
233-
"Events.type": "ReleaseEvent",
234-
},
235-
Object {
236-
"Events.count": "1",
237-
"Events.type": "MemberEvent",
236+
"Events.count": "120",
237+
"Events.type": "CreateEvent",
238238
},
239239
Object {
240240
"Events.count": "1",

packages/cubejs-testing/test/abstract-test-case.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const asserts: [options: QueryTestOptions, query: Query][] = [
4040
],
4141
[
4242
{
43-
name: '#3 Events.count with Events.type order by Events.count DESC',
43+
name: '#3 Events.count with Events.type order by Events.type DESC',
4444
ws: true,
4545
},
4646
{
@@ -49,7 +49,7 @@ const asserts: [options: QueryTestOptions, query: Query][] = [
4949
],
5050
timeDimensions: [],
5151
order: {
52-
'Events.count': 'desc'
52+
'Events.type': 'desc'
5353
},
5454
dimensions: [
5555
'Events.type'

0 commit comments

Comments
 (0)