001    package org.hackystat.sensorbase.resource.db;
002    
003    
004    import org.hackystat.sensorbase.client.SensorBaseClient;
005    import org.hackystat.sensorbase.test.SensorBaseRestApiHelper;
006    import org.junit.Test;
007    /**
008     * Tests the Compress REST API.
009     * 
010     * @author Philip Johnson
011     */
012    public class TestCompressRestApi extends SensorBaseRestApiHelper {
013    
014      /**
015       * Test that PUT {host}/db/compress compresses the database tables.
016       * 
017       * @throws Exception If problems occur.
018       */
019      @Test
020      public void testCompress() throws Exception { //NOPMD
021        SensorBaseClient client = new SensorBaseClient(getHostName(), adminEmail, adminPassword);
022        client.authenticate();
023        client.setTimeout(200000);
024        client.compressTables();
025      }
026    }