@@ -64,7 +64,7 @@ trait TestData {
64
64
" key2" -> None ,
65
65
" key3" -> Some (" value3" )
66
66
)
67
- protected val additionalDataDTO2 : AdditionalDataDTO = Map (
67
+ protected val additionalDataDTO2 : AdditionalDataDTO = Map (
68
68
" key1" -> Some (" value1" ),
69
69
" key2" -> Some (" value2" ),
70
70
" key3" -> Some (" value3" )
@@ -139,21 +139,21 @@ trait TestData {
139
139
)
140
140
141
141
protected val atumContextDTO2 : AtumContextDTO = atumContextDTO1.copy(
142
- partitioning = partitioningSubmitDTO1 .partitioning,
142
+ partitioning = partitioningSubmitDTO2 .partitioning,
143
143
measures = Set (MeasureDTO (" count" , Seq (" 1" )))
144
144
)
145
145
146
146
// Checkpoint Query DTO
147
147
protected val checkpointQueryDTO1 : CheckpointQueryDTO = CheckpointQueryDTO (
148
148
partitioning = partitioningDTO1,
149
149
limit = Option (2 ),
150
- checkpointName = Option (" checkpointName" )
150
+ checkpointName = Option (" checkpointName" ),
151
151
)
152
152
153
153
protected val checkpointQueryDTO2 : CheckpointQueryDTO = CheckpointQueryDTO (
154
154
partitioning = partitioningDTO2,
155
155
limit = Option (5 ),
156
- checkpointName = Option (" noCheckpoints" )
156
+ checkpointName = Option (" noCheckpoints" ),
157
157
)
158
158
159
159
protected val checkpointQueryDTO3 : CheckpointQueryDTO = CheckpointQueryDTO (
@@ -165,8 +165,9 @@ trait TestData {
165
165
// Checkpoint DTO
166
166
protected val checkpointDTO1 : CheckpointDTO = CheckpointDTO (
167
167
id = UUID .randomUUID(),
168
- name = " name " ,
168
+ name = checkpointQueryDTO1.checkpointName.get ,
169
169
author = " author" ,
170
+ measuredByAtumAgent = true ,
170
171
partitioning = checkpointQueryDTO1.partitioning,
171
172
processStartTime = ZonedDateTime .now(),
172
173
processEndTime = Some (ZonedDateTime .now()),
@@ -175,9 +176,10 @@ trait TestData {
175
176
176
177
protected val checkpointDTO2 : CheckpointDTO = CheckpointDTO (
177
178
id = UUID .randomUUID(),
178
- name = " name2 " ,
179
+ name = checkpointQueryDTO2.checkpointName.get ,
179
180
author = " author2" ,
180
- partitioning = checkpointQueryDTO1.partitioning,
181
+ measuredByAtumAgent = true ,
182
+ partitioning = checkpointQueryDTO2.partitioning,
181
183
processStartTime = ZonedDateTime .now(),
182
184
processEndTime = Some (ZonedDateTime .now()),
183
185
measurements = measurementsDTO2.toSet
@@ -188,43 +190,54 @@ trait TestData {
188
190
// Checkpoint From DB
189
191
protected val checkpointFromDB1 : CheckpointFromDB = CheckpointFromDB (
190
192
idCheckpoint = checkpointDTO1.id,
191
- checkpointName = " name " ,
193
+ checkpointName = checkpointQueryDTO1.checkpointName.get ,
192
194
author = " author" ,
193
195
measuredByAtumAgent = true ,
194
- measureName = " cnt" ,
195
- measuredColumns = Seq (" col1" , " col2" ),
196
- measurementValue = parser.parse(
197
- """
196
+ measureName = measureDTO1.measureName,
197
+ measuredColumns = measureDTO1.measuredColumns,
198
+ measurementValue = parser
199
+ .parse(
200
+ """
198
201
|{
199
202
| "mainValue": {
200
203
| "value": "123",
201
204
| "valueType": "Long"
202
205
| },
203
206
| "supportValues": {
204
- | "help1 ": {
205
- | "value": "666 ",
207
+ | "key1 ": {
208
+ | "value": "123456789 ",
206
209
| "valueType": "Long"
207
210
| },
208
- | "help2 ": {
209
- | "value": "99.9 ",
210
- | "valueType": "Double "
211
+ | "key2 ": {
212
+ | "value": "12345.6789 ",
213
+ | "valueType": "BigDecimal "
211
214
| }
212
215
| }
213
216
|}
214
217
|""" .stripMargin
215
- ).getOrElse {
216
- throw new Exception (" Failed to parse JSON" )
217
- },
218
+ )
219
+ .getOrElse {
220
+ throw new Exception (" Failed to parse JSON" )
221
+ },
218
222
checkpointStartTime = checkpointDTO1.processStartTime,
219
- checkpointEndTime = None ,
223
+ checkpointEndTime = checkpointDTO1.processEndTime
220
224
)
221
225
protected val checkpointFromDB2 : CheckpointFromDB = checkpointFromDB1
222
- .copy(idCheckpoint = checkpointDTO2.id, checkpointStartTime = checkpointDTO2.processStartTime)
226
+ .copy(
227
+ idCheckpoint = checkpointDTO2.id,
228
+ checkpointName = checkpointQueryDTO2.checkpointName.get,
229
+ author = " author2" ,
230
+ measuredByAtumAgent = true ,
231
+ measureName = measureDTO2.measureName,
232
+ measuredColumns = measureDTO2.measuredColumns,
233
+ checkpointStartTime = checkpointDTO2.processStartTime,
234
+ checkpointEndTime = checkpointDTO2.processEndTime
235
+
236
+ )
223
237
224
238
protected val checkpointFromDB3 : CheckpointFromDB = checkpointFromDB1
225
239
.copy(idCheckpoint = checkpointDTO3.id, checkpointStartTime = checkpointDTO3.processStartTime)
226
240
227
-
228
241
protected def createAtumContextDTO (partitioningSubmitDTO : PartitioningSubmitDTO ): AtumContextDTO = {
229
242
val measures : Set [MeasureDTO ] = Set (MeasureDTO (" count" , Seq (" *" )))
230
243
val additionalData : AdditionalDataDTO = Map .empty
0 commit comments