Skip to content

Commit

Permalink
Added missing Copyright header comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdvm committed Jan 18, 2024
1 parent b567c31 commit 950f735
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
21 changes: 16 additions & 5 deletions tests/TLSTester.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2024 MonetDB Foundation;
* Copyright August 2008 - 2023 MonetDB B.V.;
* Copyright 1997 - July 2008 CWI.
*/

import org.monetdb.mcl.net.Parameter;

import java.io.*;
Expand Down Expand Up @@ -130,8 +142,8 @@ private void run() throws IOException, SQLException {
test_refuse_wrong_host();
test_refuse_tlsv12();
test_refuse_expired();
// test_connect_client_auth1();
// test_connect_client_auth2();
// test_connect_client_auth1();
// test_connect_client_auth2();
test_fail_tls_to_plain();
test_fail_plain_to_tls();
test_connect_server_name();
Expand Down Expand Up @@ -301,14 +313,13 @@ public void expectFailure(String... expectedMessages) throws SQLException {
expectSuccess();
throw new RuntimeException("Expected test " + testName + " to throw an exception but it didn't");
} catch (SQLException e) {
for (String expected : expectedMessages)
for (String expected : expectedMessages) {
if (e.getMessage().contains(expected))
return;
}
String message = "Test " + testName + " threw the wrong exception: " + e.getMessage() + '\n' + "Expected:\n <" + String.join(">\n <", expectedMessages) + ">";
throw new RuntimeException(message, e);

}
}

}
}
12 changes: 12 additions & 0 deletions tests/UrlTester.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2024 MonetDB Foundation;
* Copyright August 2008 - 2023 MonetDB B.V.;
* Copyright 1997 - July 2008 CWI.
*/

import org.monetdb.mcl.net.*;

import java.io.*;
Expand Down

0 comments on commit 950f735

Please sign in to comment.