-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rerun one test / Rerun suite #337
Changes from 147 commits
a381d76
386273c
1526443
2e096a5
010593b
a6198eb
556f061
e0bd59b
fbd14d9
956dcfa
278d22b
c22ccee
f9d9660
aa1d99d
fd39331
20395cb
48c1563
b421341
73b0abd
6715f59
988f255
c020d2f
d4b3350
f7ca219
bdf2fb9
0765aae
deb4cc9
140869e
0e9c74a
fb8e612
a00b8a1
130a76b
ea87d9d
89410ae
0af1cef
c5d11b1
586cf82
87f6567
b72b6ae
e22bb69
ce37513
91f2305
71c089a
82f76e0
bdc4bd0
f88ab76
2b1c330
521428a
d7d2fd1
efd6fb2
374153f
831ec35
bdee2da
f443d1c
c500017
da0a5b9
ce07e0b
ad8b522
02876c2
5e56e20
cb735c3
837feb0
a59978f
09d6672
58fd3a3
50e368d
b2a0afd
93e9436
1d6be4e
fa10a6e
5450a7c
72b58a8
4c1bcd7
9a4b71f
6ec9096
79ec038
a6701df
1146fa3
4972647
edd6c5d
7be20ba
231ea33
520402d
23bda3a
9b338cd
54e7c3f
883f833
c5f892c
a98d951
cb45bb3
e954ac7
4dc414d
d089a07
acf4437
6335fb5
3112cd4
abcaed8
90ffdf5
c9c141d
aaf3ab3
8d9fcd5
9f4c22a
4909046
bc500dc
8c1d52a
648f823
0fee1db
624da29
aeeefc5
4b66674
39bb767
99959f1
b72a58b
39c1554
fcbb7c2
be44014
188ed1a
eac01e3
4abab31
ab35260
b47ba4b
d915dd3
c98ea26
02c8c98
4a9fbf6
caf218e
36420f8
49383c0
9688e00
91ed8c4
98c81e2
f93d800
9028638
e44f548
b07fa67
dc50bd5
6c648e5
4d27c1b
6b81bba
08bce92
6b8667a
c8451cf
0c2cd28
9bc6cde
9af85c2
5f60048
74dba89
3e10020
c97b06c
3a2f6ec
5e1c2c3
dbc5a0d
4403542
ad910a5
69e6edd
5621f56
7eefd43
cfb375f
9b63cd6
fa6784d
bdbf8eb
37c8079
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* AET | ||
* | ||
* Copyright (C) 2013 Cognifide Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License | ||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
* or implied. See the License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package com.cognifide.aet.communication.api.messages; | ||
|
||
import java.io.Serializable; | ||
import java.util.Arrays; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
public class FullProgressLog implements Serializable { | ||
|
||
private static final long serialVersionUID = -7331561874304014158L; | ||
|
||
private ProgressLog compareLog; | ||
private ProgressLog collectLog; | ||
|
||
public FullProgressLog(ProgressLog collectLog, ProgressLog compareLog) { | ||
this.collectLog = collectLog; | ||
this.compareLog = compareLog; | ||
} | ||
|
||
public ProgressLog getCompareLog() { | ||
return compareLog; | ||
} | ||
|
||
public ProgressLog getCollectLog() { | ||
return collectLog; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return StringUtils.join(Arrays.asList(compareLog, collectLog), " ::: "); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,11 @@ | |
* or implied. See the License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package com.cognifide.aet.runner.processing; | ||
package com.cognifide.aet.communication.api.messages; | ||
|
||
public class ProgressLog { | ||
import java.io.Serializable; | ||
|
||
public class ProgressLog implements Serializable { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add |
||
|
||
private final String name; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ public class Comparator extends Operation implements Commentable, Named { | |
|
||
private ComparatorStepResult stepResult; | ||
|
||
private final List<Operation> filters = new ArrayList<>(); | ||
private List<Operation> filters = new ArrayList<>(); | ||
|
||
private String comment; | ||
|
||
|
@@ -49,6 +49,9 @@ public void setStepResult(ComparatorStepResult stepResult) { | |
} | ||
|
||
public List<Operation> getFilters() { | ||
if(filters == null){ | ||
return new ArrayList<>(); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could be a little bit confusing why I compare filters with null, filters have initial value There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic is managed by Let's just be sure that changing logic here won't break metadata documents saved before this change is introduced. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can leave it as is, without refactoring |
||
return ImmutableList.copyOf(filters); | ||
} | ||
|
||
|
@@ -68,6 +71,10 @@ public void setStatistics(Statistics statistics) { | |
this.statistics = statistics; | ||
} | ||
|
||
public void setFilters(List<Operation> filters) { | ||
this.filters = filters; | ||
} | ||
|
||
@Override | ||
public void setComment(String comment) { | ||
this.comment = comment; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* AET | ||
* | ||
* Copyright (C) 2013 Cognifide Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License | ||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
* or implied. See the License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package com.cognifide.aet.communication.api.metadata; | ||
|
||
public enum RunType { | ||
SUITE, | ||
TEST, | ||
URL, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,15 @@ | |
import com.google.common.base.MoreObjects; | ||
import java.io.Serializable; | ||
import java.util.HashSet; | ||
import java.util.Optional; | ||
import java.util.Set; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
import org.hibernate.validator.constraints.NotBlank; | ||
|
||
public class Test implements Serializable, Commentable, Named { | ||
|
||
private static final long serialVersionUID = -220660503633061510L; | ||
private static final long serialVersionUID = 6761670624207862805L; | ||
|
||
@NotBlank | ||
private final String name; | ||
|
@@ -38,7 +39,7 @@ public class Test implements Serializable, Commentable, Named { | |
|
||
@Valid | ||
@NotNull(message = "Test must have at least one url") | ||
private final Set<Url> urls = new HashSet<>(); | ||
private Set<Url> urls = new HashSet<>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because of this function public void setUrls(Set<Url> urls) {
this.urls = urls;
} It was created for unit tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is for unit tests only, maybe it would be sufficient to make this setter package-protected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can not make it package-protected because it is not for the test this class but for the class that used Test class |
||
|
||
/** | ||
* @param name - name of a test | ||
|
@@ -115,4 +116,25 @@ public String toString() { | |
.add("name", name) | ||
.toString(); | ||
} | ||
|
||
public Optional<Url> getUrl(String urlName) { | ||
Url urlToReturn = null; | ||
for (Url url: this.urls) { | ||
if(url.getName().equals(urlName)){ | ||
urlToReturn = url; | ||
break; | ||
} | ||
} | ||
return Optional.ofNullable(urlToReturn); | ||
} | ||
|
||
public void setUrls(Set<Url> urls) { | ||
this.urls = urls; | ||
} | ||
|
||
public void setRerunUrls() { | ||
for (Url url: this.urls) { | ||
url.setReran(); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add
serialVersionUID
to this and allSerializable
classes.