Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dockerized Testing Toolkit
DTT Backend
Commits
26b5c569
Verified
Commit
26b5c569
authored
Jan 09, 2021
by
Lukas Wiest
🚂
Browse files
refactor(model): rework result classes
parent
a54d91a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/hftstuttgart/models/ModocotResult.java
View file @
26b5c569
...
...
@@ -15,8 +15,9 @@ public class ModocotResult
public
static
enum
State
{
UNKNOWN
,
SUCCESS
,
FAILURE
,
UNKNOWN
COMPILATIONERROR
,
}
}
src/main/java/de/hftstuttgart/models/ModocotResultSummary.java
View file @
26b5c569
package
de.hftstuttgart.models
;
import
java.util.HashSet
;
import
java.util.Set
;
public
class
ModocotResultSummary
{
public
long
timestamp
;
public
int
testCount
;
public
int
failureCount
;
public
int
successCount
;
public
String
globalStacktrace
;
public
Set
<
ModocotResult
>
successes
;
public
Set
<
ModocotResult
>
failures
;
public
Set
<
ModocotResult
>
compilationErrors
;
public
long
timestamp
=
System
.
currentTimeMillis
()
/
1000
;
public
String
globalStacktrace
=
null
;
public
Set
<
ModocotResult
>
results
=
new
HashSet
<>();
}
src/main/java/de/hftstuttgart/utils/UnifiedTicketingUtil.java
View file @
26b5c569
...
...
@@ -264,9 +264,13 @@ public class UnifiedTicketingUtil {
// for each fail or compile error
LOG
.
debug
(
"start failed tests reporting"
);
resultSummary
.
failures
.
forEach
(
f
->
processResult
(
ts
,
tickets
,
f
,
false
));
resultSummary
.
results
.
stream
()
.
filter
(
r
->
r
.
state
==
ModocotResult
.
State
.
FAILURE
.
ordinal
())
.
forEach
(
f
->
processResult
(
ts
,
tickets
,
f
,
false
));
LOG
.
debug
(
"start compilation errors reporting"
);
resultSummary
.
compilationErrors
.
forEach
(
c
->
processResult
(
ts
,
tickets
,
c
,
true
));
resultSummary
.
results
.
stream
()
.
filter
(
r
->
r
.
state
==
ModocotResult
.
State
.
COMPILATIONERROR
.
ordinal
())
.
forEach
(
c
->
processResult
(
ts
,
tickets
,
c
,
true
));
LOG
.
debug
(
"closing all remaining tickets, no longer appeared"
);
tickets
.
forEach
(
ticket
->
ticket
.
close
().
save
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment