Skip to content

Commit

Permalink
activity yaml fix for missing parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jshook committed Feb 10, 2016
1 parent c94de4e commit 907e5d2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>2.2.0-rc1</version>
<version>3.0.0-rc1</version>
</dependency>

<dependency>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/metawiring/load/core/ExecutionContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.ScheduledReporter;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.ProtocolOptions;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.*;
import com.metawiring.load.config.TestClientConfig;
import com.metawiring.load.generator.*;
import org.joda.time.Interval;
Expand Down Expand Up @@ -52,6 +50,7 @@ public TestClientConfig getConfig() {
public void startup() {

Cluster.Builder builder = Cluster.builder()
.withTimestampGenerator(ServerSideTimestampGenerator.INSTANCE)
.addContactPoint(config.host)
.withPort(config.port)
.withCompression(ProtocolOptions.Compression.NONE);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/activities/read-tenfields-random.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ dml:
- name: read-tenfields-random
cql: |
select * from <<KEYSPACE>>.<<TABLE>>_tenfields
where key=?
where key=<<key>>
bindings:
key: RandomStringRangeGenerator:1:50000000
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
*
* Copyright 2015 Jonathan Shook
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.metawiring.load.generators;

import org.testng.annotations.Test;

import static org.testng.Assert.*;

public class RandomStringRangeGeneratorTest {

@Test
public void shouldReturnCorrectType() {
RandomStringRangeGenerator rsrg = new RandomStringRangeGenerator("1000","2000");
String s = rsrg.get();
}

}

0 comments on commit 907e5d2

Please sign in to comment.