Project

General

Profile

Download (1.75 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2014 EDIT
3
 * European Distributed Institute of Taxonomy
4
 * http://www.e-taxonomy.eu
5
 *
6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7
 * See LICENSE.TXT at the top of this package for the full license terms.
8
 */
9
package eu.etaxonomy.taxeditor.httpinvoker;
10

    
11
import org.apache.log4j.Logger;
12
import org.junit.Assert;
13
import org.junit.Ignore;
14
import org.junit.Test;
15

    
16
import eu.etaxonomy.cdm.api.service.ITestService;
17
import eu.etaxonomy.cdm.config.CdmSourceException;
18
import eu.etaxonomy.cdm.model.description.PolytomousKey;
19

    
20
/**
21
 * Class to test the HttpInvoker services exposed by the CDM Sever
22
 *
23
 */
24
public class HttpInvokerServicesTest extends BaseRemotingTest {
25
    private static final Logger logger = Logger.getLogger(HttpInvokerServicesTest.class);
26

    
27
    ITestService testService =  getRemoteApplicationController().getTestService();
28

    
29
    @Test
30
    public void whenCallingMethodsOnRemoteServicesThenSucceed() {
31
        try {
32

    
33
            //getRemoteApplicationController().getDatabaseService();
34
            String dbSchemaVersion = getRemoteApplicationController().getDatabaseService().getDbSchemaVersion();
35
            logger.info("dbSchemaVersion is " + dbSchemaVersion);
36

    
37

    
38
        } catch (CdmSourceException e) {
39
            Assert.fail("pinging database service on active cdm server should not have thrown CdmSourceException");
40
        }
41

    
42
        getRemoteApplicationController().getPolytomousKeyService().list(PolytomousKey.class, null, null, null, null);
43
    }
44

    
45
    // should be kept at ignore and only used for manual testing
46
    // otherwise tests will take too much time
47
    @Ignore
48
    @Test
49
    public void testDisableReadTimeout() throws InterruptedException  {
50
        testService.waitFor((long) 120000.0);
51
    }
52

    
53
}
(6-6/7)