Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 93b1c2b7f512b2aceed1464fa0ffe03d5e8b3731 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//
//  ========================================================================
//  Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd.
//  ------------------------------------------------------------------------
//  All rights reserved. This program and the accompanying materials
//  are made available under the terms of the Eclipse Public License v1.0
//  and Apache License v2.0 which accompanies this distribution.
//
//      The Eclipse Public License is available at
//      http://www.eclipse.org/legal/epl-v10.html
//
//      The Apache License v2.0 is available at
//      http://www.opensource.org/licenses/apache2.0.php
//
//  You may elect to redistribute this code under either of these licenses.
//  ========================================================================
//

package org.eclipse.jetty.client;

import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.not;

import java.util.Locale;

import org.eclipse.jetty.client.helperClasses.ServerAndClientCreator;
import org.eclipse.jetty.client.helperClasses.SslServerAndClientCreator;
import org.eclipse.jetty.server.Connector;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

/**
 * Functional testing for HttpExchange.
 */
public class SslHttpExchangeTest extends HttpExchangeTest
{
    protected static ServerAndClientCreator serverAndClientCreator = new SslServerAndClientCreator();
    
    /* ------------------------------------------------------------ */
    @Before
    public void setUpOnce() throws Exception
    {
        _scheme="https";
        _server = serverAndClientCreator.createServer();
        _httpClient = serverAndClientCreator.createClient(3000L,3500L,2000);
        Connector[] connectors = _server.getConnectors();
        _port = connectors[0].getLocalPort();
    }

    /* ------------------------------------------------------------ */
    private void IgnoreTestOnBuggyIBM()
    {
        // Use Junit 4.x to flag test as ignored if encountering IBM JVM
        // Will show up in various junit reports as an ignored test as well.
        Assume.assumeThat(System.getProperty("java.vendor").toLowerCase(Locale.ENGLISH),not(containsString("ibm")));
    }

    /* ------------------------------------------------------------ */
    /**
     * @see org.eclipse.jetty.client.HttpExchangeTest#testGetWithContentExchange()
     */
    @Test
    @Override
    public void testGetWithContentExchange() throws Exception
    {
        // TODO Resolve problems on IBM JVM https://bugs.eclipse.org/bugs/show_bug.cgi?id=304532
        IgnoreTestOnBuggyIBM();
        super.testGetWithContentExchange();
    }

    /* ------------------------------------------------------------ */
    /**
     * @see org.eclipse.jetty.client.HttpExchangeTest#testPerf()
     */
    @Test
    @Override
    public void testPerf() throws Exception
    {
        // TODO Resolve problems on IBM JVM https://bugs.eclipse.org/bugs/show_bug.cgi?id=304532
        IgnoreTestOnBuggyIBM();
        super.testPerf();
    }

    /* ------------------------------------------------------------ */
    /**
     * @see org.eclipse.jetty.client.HttpExchangeTest#testPostWithContentExchange()
     */
    @Test
    @Override
    public void testPostWithContentExchange() throws Exception
    {
        // TODO Resolve problems on IBM JVM https://bugs.eclipse.org/bugs/show_bug.cgi?id=304532
        IgnoreTestOnBuggyIBM();
        super.testPostWithContentExchange();
    }

    /* ------------------------------------------------------------ */
    /**
     * @see org.eclipse.jetty.client.HttpExchangeTest#testReserveConnections()
     */
    @Test
    @Override
    public void testReserveConnections() throws Exception
    {
        // TODO Resolve problems on IBM JVM https://bugs.eclipse.org/bugs/show_bug.cgi?id=304532
        IgnoreTestOnBuggyIBM();
        super.testReserveConnections();
    }
}

Back to the top