Skip to content

Commit 62b90df

Browse files
committed
Make ConnectionSupplier transient
Stops it being saved in XML
1 parent 777080b commit 62b90df

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/io/jenkins/plugins/junit/storage/database/DatabaseTestResultStorage.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ public class DatabaseTestResultStorage extends JunitTestResultStorage {
4141

4242
static final String CASE_RESULTS_TABLE = "caseResults";
4343

44-
static boolean queriesPermitted;
45-
46-
private final ConnectionSupplier connectionSupplier = new LocalConnectionSupplier();
44+
private transient final ConnectionSupplier connectionSupplier = new LocalConnectionSupplier();
4745

4846
@DataBoundConstructor
4947
public DatabaseTestResultStorage() {}
@@ -75,9 +73,6 @@ private interface Querier<T> {
7573
@Override public TestResultImpl load(String job, int build) {
7674
return new TestResultImpl() {
7775
private <T> T query(Querier<T> querier) {
78-
if (!queriesPermitted) {
79-
throw new IllegalStateException("Should not have been running any queries yet");
80-
}
8176
try {
8277
Connection connection = connectionSupplier.connection();
8378
return querier.run(connection);

0 commit comments

Comments
 (0)