Skip to content

Commit

Permalink
Tests reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
tsegismont committed Jun 26, 2015
1 parent 14bf6a4 commit d8068e1
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans.fullstack;
package org.hawkular.metrics.clients.ptrans.data;

/**
* @author Thomas Segismont
*/
final class MetricData {
public final class MetricData {
long timestamp;
double value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans.fullstack;
package org.hawkular.metrics.clients.ptrans.data;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
* @author Thomas Segismont
*/
@JsonIgnoreProperties(ignoreUnknown = true)
class MetricName {
public class MetricName {
String id;

public String getId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans.fullstack;
package org.hawkular.metrics.clients.ptrans.data;

/**
* @author Thomas Segismont
*/
class Point {
public class Point {
final String name;
final long timestamp;
final double value;

Point(String name, long timestamp, double value) {
public Point(String name, long timestamp, double value) {
this.name = name;
this.timestamp = timestamp;
this.value = value;
}

String getName() {
public String getName() {
return name;
}

long getTimestamp() {
public long getTimestamp() {
return timestamp;
}

double getValue() {
public double getValue() {
return value;
}

@Override
public String toString() {
return "Point[" +
"name='" + name + '\'' +
", timestamp=" + timestamp +
", value=" + value +
']';
"name='" + name + '\'' +
", timestamp=" + timestamp +
", value=" + value +
']';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans.fullstack;
package org.hawkular.metrics.clients.ptrans.data;

import static java.util.stream.Collectors.toList;

Expand All @@ -37,7 +37,7 @@
*
* @author Thomas Segismont
*/
class ServerDataHelper {
public class ServerDataHelper {
public static final String BASE_URI = System.getProperty(
"hawkular-metrics.base-uri",
"127.0.0.1:8080/hawkular/metrics"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.exec;

import static java.util.stream.Collectors.joining;

import static org.hamcrest.CoreMatchers.allOf;
import static org.hawkular.metrics.clients.ptrans.CanReadMatcher.canRead;
import static org.hawkular.metrics.clients.ptrans.ConfigurationKey.SERVICES;
import static org.hawkular.metrics.clients.ptrans.IsFileMatcher.isFile;
import static org.hawkular.metrics.clients.ptrans.matchers.CanReadMatcher.canRead;
import static org.hawkular.metrics.clients.ptrans.matchers.IsFileMatcher.isFile;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertThat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.exec;

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
Expand All @@ -24,6 +24,7 @@
import java.io.IOException;
import java.nio.file.Files;

import org.hawkular.metrics.clients.ptrans.util.PrintOutputOnFailureWatcher;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.exec;

import static org.hawkular.metrics.clients.ptrans.ConfigurationKey.SERVICES;

Expand All @@ -28,6 +28,8 @@
import java.net.Socket;
import java.util.Properties;

import org.hawkular.metrics.clients.ptrans.Configuration;
import org.hawkular.metrics.clients.ptrans.Service;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.exec;

import static org.hamcrest.CoreMatchers.allOf;
import static org.hawkular.metrics.clients.ptrans.CanReadMatcher.canRead;
import static org.hawkular.metrics.clients.ptrans.ContainsMatcher.contains;
import static org.hawkular.metrics.clients.ptrans.HasSizeMatcher.hasSize;
import static org.hawkular.metrics.clients.ptrans.IsFileMatcher.isFile;
import static org.hawkular.metrics.clients.ptrans.matchers.CanReadMatcher.canRead;
import static org.hawkular.metrics.clients.ptrans.matchers.ContainsMatcher.contains;
import static org.hawkular.metrics.clients.ptrans.matchers.HasSizeMatcher.hasSize;
import static org.hawkular.metrics.clients.ptrans.matchers.IsFileMatcher.isFile;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertThat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.exec;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;

import static org.hamcrest.CoreMatchers.allOf;
import static org.hawkular.metrics.clients.ptrans.CanReadMatcher.canRead;
import static org.hawkular.metrics.clients.ptrans.ContainsMatcher.contains;
import static org.hawkular.metrics.clients.ptrans.IsFileMatcher.isFile;
import static org.hawkular.metrics.clients.ptrans.WriteLockedMatcher.writeLocked;
import static org.hawkular.metrics.clients.ptrans.matchers.CanReadMatcher.canRead;
import static org.hawkular.metrics.clients.ptrans.matchers.ContainsMatcher.contains;
import static org.hawkular.metrics.clients.ptrans.matchers.IsFileMatcher.isFile;
import static org.hawkular.metrics.clients.ptrans.matchers.WriteLockedMatcher.writeLocked;
import static org.hawkular.metrics.clients.ptrans.util.ProcessUtil.getPid;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
import java.util.stream.Stream;

import org.hawkular.metrics.clients.ptrans.ConfigurationKey;
import org.hawkular.metrics.clients.ptrans.PrintOutputOnFailureWatcher;
import org.hawkular.metrics.clients.ptrans.Service;
import org.hawkular.metrics.clients.ptrans.data.Point;
import org.hawkular.metrics.clients.ptrans.util.PrintOutputOnFailureWatcher;
import org.junit.After;
import org.junit.Rule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import static java.util.concurrent.TimeUnit.SECONDS;
import static java.util.stream.Collectors.joining;

import static org.hawkular.metrics.clients.ptrans.fullstack.ServerDataHelper.BASE_URI;
import static org.hawkular.metrics.clients.ptrans.data.ServerDataHelper.BASE_URI;
import static org.hawkular.metrics.clients.ptrans.util.ProcessUtil.kill;
import static org.hawkular.metrics.clients.ptrans.util.TenantUtil.getRandomTenantId;
import static org.junit.Assert.assertEquals;
Expand All @@ -36,7 +36,9 @@
import java.util.Properties;

import org.hawkular.metrics.clients.ptrans.ConfigurationKey;
import org.hawkular.metrics.clients.ptrans.ExecutableITestBase;
import org.hawkular.metrics.clients.ptrans.data.Point;
import org.hawkular.metrics.clients.ptrans.data.ServerDataHelper;
import org.hawkular.metrics.clients.ptrans.exec.ExecutableITestBase;
import org.junit.Before;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import org.hawkular.metrics.clients.ptrans.ConfigurationKey;
import org.hawkular.metrics.clients.ptrans.Service;
import org.hawkular.metrics.clients.ptrans.data.Point;
import org.jmxtrans.embedded.EmbeddedJmxTrans;
import org.jmxtrans.embedded.QueryResult;
import org.jmxtrans.embedded.config.ConfigurationParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.matchers;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.matchers;

import static org.hawkular.metrics.clients.ptrans.util.Arguments.checkArgument;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.matchers;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.matchers;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.matchers;

import java.io.File;
import java.io.RandomAccessFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.clients.ptrans;
package org.hawkular.metrics.clients.ptrans.util;

import java.io.File;
import java.io.IOException;
Expand Down

0 comments on commit d8068e1

Please sign in to comment.