Search in sources :

Example 1 with Action

use of io.nosqlbench.engine.api.activityapi.core.Action in project nosqlbench by nosqlbench.

the class StdoutActivityTypeTest method testDiagActivity.

@Test
public void testDiagActivity() {
    StdoutActivityType stdoutAt = new StdoutActivityType();
    ActivityDef ad = ActivityDef.parseActivityDef("driver=stdout; yaml=stdout-test;");
    StdoutActivity stdoutActivity = stdoutAt.getActivity(ad);
    ActionDispenser actionDispenser = stdoutAt.getActionDispenser(stdoutActivity);
    Action action = actionDispenser.getAction(1);
}
Also used : Action(io.nosqlbench.engine.api.activityapi.core.Action) ActionDispenser(io.nosqlbench.engine.api.activityapi.core.ActionDispenser) ActivityDef(io.nosqlbench.engine.api.activityimpl.ActivityDef) Test(org.junit.jupiter.api.Test)

Example 2 with Action

use of io.nosqlbench.engine.api.activityapi.core.Action in project nosqlbench by nosqlbench.

the class HttpActivityTypeTest method testHttpActivity.

@Test
public void testHttpActivity() {
    HttpActivityType httpAt = new HttpActivityType();
    ActivityDef ad = ActivityDef.parseActivityDef("driver=http; yaml=http-google.yaml; port=80; cycles=1;");
    HttpActivity httpActivity = httpAt.getActivity(ad);
    httpActivity.initActivity();
    ActionDispenser actionDispenser = httpAt.getActionDispenser(httpActivity);
    Action action = actionDispenser.getAction(1);
}
Also used : Action(io.nosqlbench.engine.api.activityapi.core.Action) ActionDispenser(io.nosqlbench.engine.api.activityapi.core.ActionDispenser) ActivityDef(io.nosqlbench.engine.api.activityimpl.ActivityDef) Test(org.junit.jupiter.api.Test)

Example 3 with Action

use of io.nosqlbench.engine.api.activityapi.core.Action in project nosqlbench by nosqlbench.

the class DiagActivityTypeTest method testDiagActivity.

@Test
public void testDiagActivity() {
    DiagActivityType da = new DiagActivityType();
    ActivityDef ad = ActivityDef.parseActivityDef("driver=diag;");
    DiagActivity a = da.getActivity(ad);
    a.initActivity();
    ActionDispenser actionDispenser = da.getActionDispenser(a);
    Action action = actionDispenser.getAction(1);
    ((SyncAction) action).runCycle(1L);
}
Also used : SyncAction(io.nosqlbench.engine.api.activityapi.core.SyncAction) Action(io.nosqlbench.engine.api.activityapi.core.Action) SyncAction(io.nosqlbench.engine.api.activityapi.core.SyncAction) ActionDispenser(io.nosqlbench.engine.api.activityapi.core.ActionDispenser) ActivityDef(io.nosqlbench.engine.api.activityimpl.ActivityDef) Test(org.junit.jupiter.api.Test)

Aggregations

Action (io.nosqlbench.engine.api.activityapi.core.Action)3 ActionDispenser (io.nosqlbench.engine.api.activityapi.core.ActionDispenser)3 ActivityDef (io.nosqlbench.engine.api.activityimpl.ActivityDef)3 Test (org.junit.jupiter.api.Test)3 SyncAction (io.nosqlbench.engine.api.activityapi.core.SyncAction)1