11/*
2- * Copyright (c) 2016, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2016, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3232 * @library /test/lib
3333 * @build DTLSOverDatagram
3434 *
35- * @run main/othervm PacketLossRetransmission client 0 hello_request
3635 * @run main/othervm PacketLossRetransmission client 1 client_hello
37- * @run main/othervm PacketLossRetransmission client 2 server_hello
38- * @run main/othervm PacketLossRetransmission client 3 hello_verify_request
39- * @run main/othervm -Djdk.tls.client.enableSessionTicketExtension=false PacketLossRetransmission client 4 new_session_ticket
40- * @run main/othervm PacketLossRetransmission client 11 certificate
41- * @run main/othervm PacketLossRetransmission client 12 server_key_exchange
42- * @run main/othervm PacketLossRetransmission client 13 certificate_request
43- * @run main/othervm PacketLossRetransmission client 14 server_hello_done
44- * @run main/othervm PacketLossRetransmission client 15 certificate_verify
4536 * @run main/othervm PacketLossRetransmission client 16 client_key_exchange
4637 * @run main/othervm PacketLossRetransmission client 20 finished
47- * @run main/othervm PacketLossRetransmission client 21 certificate_url
48- * @run main/othervm PacketLossRetransmission client 22 certificate_status
49- * @run main/othervm PacketLossRetransmission client 23 supplemental_data
5038 * @run main/othervm PacketLossRetransmission client -1 change_cipher_spec
51- * @run main/othervm PacketLossRetransmission server 0 hello_request
52- * @run main/othervm PacketLossRetransmission server 1 client_hello
5339 * @run main/othervm PacketLossRetransmission server 2 server_hello
5440 * @run main/othervm PacketLossRetransmission server 3 hello_verify_request
55- * @run main/othervm -Djdk.tls.client.enableSessionTicketExtension=false PacketLossRetransmission server 4 new_session_ticket
5641 * @run main/othervm PacketLossRetransmission server 11 certificate
5742 * @run main/othervm PacketLossRetransmission server 12 server_key_exchange
58- * @run main/othervm PacketLossRetransmission server 13 certificate_request
5943 * @run main/othervm PacketLossRetransmission server 14 server_hello_done
60- * @run main/othervm PacketLossRetransmission server 15 certificate_verify
61- * @run main/othervm PacketLossRetransmission server 16 client_key_exchange
6244 * @run main/othervm PacketLossRetransmission server 20 finished
63- * @run main/othervm PacketLossRetransmission server 21 certificate_url
64- * @run main/othervm PacketLossRetransmission server 22 certificate_status
65- * @run main/othervm PacketLossRetransmission server 23 supplemental_data
6645 * @run main/othervm PacketLossRetransmission server -1 change_cipher_spec
6746 */
6847
7958public class PacketLossRetransmission extends DTLSOverDatagram {
8059 private static boolean isClient ;
8160 private static byte handshakeType ;
61+ private static final int TIMEOUT = 500 ;
8262
8363 private boolean needPacketLoss = true ;
8464
@@ -87,6 +67,7 @@ public static void main(String[] args) throws Exception {
8767 handshakeType = Byte .parseByte (args [1 ]);
8868
8969 PacketLossRetransmission testCase = new PacketLossRetransmission ();
70+ testCase .setSocketTimeout (TIMEOUT );
9071 testCase .runTest (testCase );
9172 }
9273
@@ -102,7 +83,7 @@ boolean produceHandshakePackets(SSLEngine engine, SocketAddress socketAddr,
10283 if (packet != null ) {
10384 needPacketLoss = false ;
10485
105- System .out .println ("Loss a packet of handshake messahe " );
86+ System .out .println ("Loss a packet of handshake message " );
10687 packets .remove (packet );
10788 }
10889 }
0 commit comments