|
10 | 10 | $testCases = [
|
11 | 11 | // some test cases are skipped, as part of stabilization
|
12 | 12 | // no products, no prices data set 0
|
13 |
| - [[], [], [['from' => 0, 'to' => '', 'count' => 54]]], |
| 13 | + [ |
| 14 | + [], [], |
| 15 | + [ |
| 16 | + ['from' => 0, 'to' => '', 'count' => 138] |
| 17 | + ], |
| 18 | + 'incomplete_reason' => ' ' |
| 19 | + ], |
14 | 20 | // small prices data set 1
|
15 | 21 | [
|
16 | 22 | range(0.01, 0.08, 0.01),
|
17 | 23 | range(1, 8, 1),
|
18 |
| - [['from' => 0, 'to' => '', 'count' => 54]] |
| 24 | + [ |
| 25 | + ['from' => 0, 'to' => '', 'count' => 138] |
| 26 | + ], |
| 27 | + 'incomplete_reason' => ' ' |
19 | 28 | ],
|
20 | 29 | // zero price test data set 2
|
21 | 30 | [
|
22 | 31 | [0, 0.71, 0.89],
|
23 | 32 | range(9, 11, 1),
|
24 |
| - [['from' => 0, 'to' =>'', 'count' => 54]] |
| 33 | + [ |
| 34 | + ['from' => 0, 'to' => '', 'count' => 138] |
| 35 | + ], |
| 36 | + 'incomplete_reason' => ' ' |
25 | 37 | ],
|
26 | 38 | // first quantile should be skipped data set 3
|
27 | 39 | [
|
|
49 | 61 | 0.15,
|
50 | 62 | ],
|
51 | 63 | range(12, 32, 1),
|
52 |
| - [['from' => 0, 'to' => '', 'count' => 54]] |
| 64 | + [ |
| 65 | + ['from' => 0, 'to' => 0.05, 'count' => 12.0], ['from' => 0.05, 'to' => '', 'count' => 126.0], |
| 66 | + ], |
| 67 | + 'incomplete_reason' => ' ' |
53 | 68 | ],
|
54 |
| -// // test if best rounding factor is used data set 4 |
55 |
| -// [ |
56 |
| -// [10.19, 10.2, 10.2, 10.2, 10.21], |
57 |
| -// range(33, 37, 1), |
58 |
| -// [['from' => 10.19, 'to' => 10.19, 'count' => 1], ['from' => 10.2, 'to' => '', 'count' => 4]] |
59 |
| -// ], |
60 |
| - // quantiles interception data set 5 |
61 |
| -// [ |
62 |
| -// [ |
63 |
| -// 5.99, |
64 |
| -// 5.99, |
65 |
| -// 7.99, |
66 |
| -// 8.99, |
67 |
| -// 8.99, |
68 |
| -// 9.99, |
69 |
| -// 9.99, |
70 |
| -// 9.99, |
71 |
| -// 9.99, |
72 |
| -// 9.99, |
73 |
| -// 14.6, |
74 |
| -// 15.99, |
75 |
| -// 16, |
76 |
| -// 16.99, |
77 |
| -// 17, |
78 |
| -// 17.5, |
79 |
| -// 18.99, |
80 |
| -// 19, |
81 |
| -// 20.99, |
82 |
| -// 24.99, |
83 |
| -// ], |
84 |
| -// range(38, 57, 1), |
85 |
| -// [ |
86 |
| -// ['from' => 0, 'to' => 9, 'count' => 5], |
87 |
| -// ['from' => 9.99, 'to' => 9.99, 'count' => 5], |
88 |
| -// ['from' => 10, 'to' => '', 'count' => 10] |
89 |
| -// ] |
90 |
| -// ], |
91 |
| -// // test if best rounding factor is used data set 6 |
92 |
| -// [ |
93 |
| -// [10.18, 10.19, 10.19, 10.19, 10.2], |
94 |
| -// range(58, 62, 1), |
95 |
| -// [['from' => 0, 'to' => 10.2, 'count' => 4], ['from' => 10.2, 'to' => 10.2, 'count' => 1]] |
96 |
| -// ], |
97 |
| - // test many equal values data set 7 |
| 69 | + // test many equal values data set 4 |
98 | 70 | [
|
99 | 71 | array_merge([10.57], array_fill(0, 20, 10.58), [10.59]),
|
100 | 72 | range(63, 84, 1),
|
101 | 73 | [
|
102 |
| - ['from' => 0, 'to' => '', 'count' => 54], |
103 |
| - ] |
| 74 | + ['from' => 0, 'to' => 15.0, 'count' => 13.0], ['from' => 15.0, 'to' => '', 'count' => 125.0], |
| 75 | + ], |
| 76 | + 'incomplete_reason' => ' ' |
| 77 | + ], |
| 78 | + // test if best rounding factor is used data set 5 |
| 79 | + [ |
| 80 | + [10.19, 10.2, 10.2, 10.2, 10.21], |
| 81 | + range(33, 37, 1), |
| 82 | + [ |
| 83 | + ['from' => 10.19, 'to' => 10.19, 'count' => 1], ['from' => 10.2, 'to' => '', 'count' => 4], |
| 84 | + ], |
| 85 | + 'incomplete_reason' => 'MC-33826:' |
| 86 | + . 'Stabilize skipped test cases for Integration AlgorithmBaseTest with elasticsearch' |
| 87 | + ], |
| 88 | + // quantiles interception data set 6 |
| 89 | + [ |
| 90 | + [ |
| 91 | + 5.99, |
| 92 | + 5.99, |
| 93 | + 7.99, |
| 94 | + 8.99, |
| 95 | + 8.99, |
| 96 | + 9.99, |
| 97 | + 9.99, |
| 98 | + 9.99, |
| 99 | + 9.99, |
| 100 | + 9.99, |
| 101 | + 14.6, |
| 102 | + 15.99, |
| 103 | + 16, |
| 104 | + 16.99, |
| 105 | + 17, |
| 106 | + 17.5, |
| 107 | + 18.99, |
| 108 | + 19, |
| 109 | + 20.99, |
| 110 | + 24.99, |
| 111 | + ], |
| 112 | + range(38, 57, 1), |
| 113 | + [ |
| 114 | + ['from' => 0, 'to' => 9, 'count' => 5], |
| 115 | + ['from' => 9.99, 'to' => 9.99, 'count' => 5], |
| 116 | + ['from' => 10, 'to' => '', 'count' => 10] |
| 117 | + ], |
| 118 | + 'incomplete_reason' => 'MC-33826:' |
| 119 | + . 'Stabilize skipped test cases for Integration AlgorithmBaseTest with elasticsearch' |
| 120 | + ], |
| 121 | + // test if best rounding factor is used data set 7 |
| 122 | + [ |
| 123 | + [10.18, 10.19, 10.19, 10.19, 10.2], |
| 124 | + range(58, 62, 1), |
| 125 | + [ |
| 126 | + ['from' => 0, 'to' => 10.2, 'count' => 4], ['from' => 10.2, 'to' => 10.2, 'count' => 1] |
| 127 | + ], |
| 128 | + 'incomplete_reason' => 'MC-33826:' |
| 129 | + . 'Stabilize skipped test cases for Integration AlgorithmBaseTest with elasticsearch', |
| 130 | + ], |
| 131 | + // test preventing low count in interval and rounding factor to have lower priority data set 8 |
| 132 | + [ |
| 133 | + [ |
| 134 | + 0.01, |
| 135 | + 0.01, |
| 136 | + 0.01, |
| 137 | + 0.02, |
| 138 | + 0.02, |
| 139 | + 0.03, |
| 140 | + 0.03, |
| 141 | + 0.04, |
| 142 | + 0.04, |
| 143 | + 0.04, |
| 144 | + 0.05, |
| 145 | + 0.05, |
| 146 | + 0.05, |
| 147 | + 0.06, |
| 148 | + 0.06, |
| 149 | + 0.06, |
| 150 | + 0.06, |
| 151 | + 0.07, |
| 152 | + 0.07, |
| 153 | + 0.08, |
| 154 | + 0.08, |
| 155 | + 2.99, |
| 156 | + 5.99, |
| 157 | + 5.99, |
| 158 | + 5.99, |
| 159 | + 5.99, |
| 160 | + 5.99, |
| 161 | + 5.99, |
| 162 | + 5.99, |
| 163 | + 5.99, |
| 164 | + 5.99, |
| 165 | + 13.50, |
| 166 | + 15.99, |
| 167 | + 41.95, |
| 168 | + 69.99, |
| 169 | + 89.99, |
| 170 | + 99.99, |
| 171 | + 99.99, |
| 172 | + 160.99, |
| 173 | + 161.94, |
| 174 | + 199.99, |
| 175 | + 199.99, |
| 176 | + 199.99, |
| 177 | + 239.99, |
| 178 | + 329.99, |
| 179 | + 447.98, |
| 180 | + 550.00, |
| 181 | + 599.99, |
| 182 | + 699.99, |
| 183 | + 750.00, |
| 184 | + 847.97, |
| 185 | + 1599.99, |
| 186 | + 2699.99, |
| 187 | + 4999.95, |
| 188 | + ], |
| 189 | + range(85, 148, 1), |
| 190 | + [ |
| 191 | + ['from' => 0, 'to' => 0.05, 'count' => 10], |
| 192 | + // this is important, that not 0.06 is used to prevent low count in interval |
| 193 | + ['from' => 0.05, 'to' => 0.07, 'count' => 7], |
| 194 | + ['from' => 0.07, 'to' => 5, 'count' => 5], |
| 195 | + ['from' => 5.99, 'to' => 5.99, 'count' => 9], |
| 196 | + ['from' => 10, 'to' => 100, 'count' => 7], |
| 197 | + ['from' => 100, 'to' => 500, 'count' => 8], |
| 198 | + ['from' => 500, 'to' => '', 'count' => 8] |
| 199 | + ], |
| 200 | + 'incomplete_reason' => 'MC-33826:' |
| 201 | + . 'Stabilize skipped test cases for Integration AlgorithmBaseTest with elasticsearch', |
104 | 202 | ],
|
105 |
| -// // test preventing low count in interval and rounding factor to have lower priority data set 8 |
106 |
| -// [ |
107 |
| -// [ |
108 |
| -// 0.01, |
109 |
| -// 0.01, |
110 |
| -// 0.01, |
111 |
| -// 0.02, |
112 |
| -// 0.02, |
113 |
| -// 0.03, |
114 |
| -// 0.03, |
115 |
| -// 0.04, |
116 |
| -// 0.04, |
117 |
| -// 0.04, |
118 |
| -// 0.05, |
119 |
| -// 0.05, |
120 |
| -// 0.05, |
121 |
| -// 0.06, |
122 |
| -// 0.06, |
123 |
| -// 0.06, |
124 |
| -// 0.06, |
125 |
| -// 0.07, |
126 |
| -// 0.07, |
127 |
| -// 0.08, |
128 |
| -// 0.08, |
129 |
| -// 2.99, |
130 |
| -// 5.99, |
131 |
| -// 5.99, |
132 |
| -// 5.99, |
133 |
| -// 5.99, |
134 |
| -// 5.99, |
135 |
| -// 5.99, |
136 |
| -// 5.99, |
137 |
| -// 5.99, |
138 |
| -// 5.99, |
139 |
| -// 13.50, |
140 |
| -// 15.99, |
141 |
| -// 41.95, |
142 |
| -// 69.99, |
143 |
| -// 89.99, |
144 |
| -// 99.99, |
145 |
| -// 99.99, |
146 |
| -// 160.99, |
147 |
| -// 161.94, |
148 |
| -// 199.99, |
149 |
| -// 199.99, |
150 |
| -// 199.99, |
151 |
| -// 239.99, |
152 |
| -// 329.99, |
153 |
| -// 447.98, |
154 |
| -// 550.00, |
155 |
| -// 599.99, |
156 |
| -// 699.99, |
157 |
| -// 750.00, |
158 |
| -// 847.97, |
159 |
| -// 1599.99, |
160 |
| -// 2699.99, |
161 |
| -// 4999.95, |
162 |
| -// ], |
163 |
| -// range(85, 148, 1), |
164 |
| -// [ |
165 |
| -// ['from' => 0, 'to' => 0.05, 'count' => 10], |
166 |
| -// // this is important, that not 0.06 is used to prevent low count in interval |
167 |
| -// ['from' => 0.05, 'to' => 0.07, 'count' => 7], |
168 |
| -// ['from' => 0.07, 'to' => 5, 'count' => 5], |
169 |
| -// ['from' => 5.99, 'to' => 5.99, 'count' => 9], |
170 |
| -// ['from' => 10, 'to' => 100, 'count' => 7], |
171 |
| -// ['from' => 100, 'to' => 500, 'count' => 8], |
172 |
| -// ['from' => 500, 'to' => '', 'count' => 8] |
173 |
| -// ] |
174 |
| -// ], |
175 | 203 | ];
|
176 | 204 |
|
177 | 205 | return $testCases;
|
0 commit comments