@Test public void getRunners() { LOG.info( "\n===RunnerDaoTest.getRunners===\n" ); List<Runner> userRunners = ESSuiteTest.runnerDao.getRunners( ESSuiteTest.USER_1, ESSuiteTest.COMMIT_ID_2, ESSuiteTest.MODULE_ID_2 ); assertEquals( 1, userRunners.size() ); }
public List<Runner> getRunners( String user, String commitId, String moduleId ) { String groupId = new RunnerGroup( user, commitId, moduleId ).getId(); SearchResponse response = getRequest( DAO_INDEX_KEY, DAO_TYPE_KEY ) .setQuery( termQuery( "groupId", groupId ) ) .execute() .actionGet(); ArrayList<Runner> runners = new ArrayList<Runner>(); for ( SearchHit hit : response.getHits().hits() ) { runners.add( toRunner( hit ) ); } return runners; }
RunnerDao extends Dao { public List<Runner> getRunners( String user, String commitId, String moduleId ) { String groupId = new RunnerGroup( user, commitId, moduleId ).getId(); SearchResponse response = getRequest( DAO_INDEX_KEY, DAO_TYPE_KEY ) .setQuery( termQuery( "groupId", groupId ) ) .execute() .actionGet(); ArrayList<Runner> runners = new ArrayList<Runner>(); for ( SearchHit hit : response.getHits().hits() ) { runners.add( toRunner( hit ) ); } return runners; } }
RunnerDao extends Dao { public List<Runner> getRunners( String user, String commitId, String moduleId ) { String groupId = new RunnerGroup( user, commitId, moduleId ).getId(); SearchResponse response = getRequest( DAO_INDEX_KEY, DAO_TYPE_KEY ) .setQuery( termQuery( "groupId", groupId ) ) .execute() .actionGet(); ArrayList<Runner> runners = new ArrayList<Runner>(); for ( SearchHit hit : response.getHits().hits() ) { runners.add( toRunner( hit ) ); } return runners; } @Inject  RunnerDao( IElasticSearchClient elasticSearchClient ); }
RunnerDao extends Dao { public List<Runner> getRunners( String user, String commitId, String moduleId ) { String groupId = new RunnerGroup( user, commitId, moduleId ).getId(); SearchResponse response = getRequest( DAO_INDEX_KEY, DAO_TYPE_KEY ) .setQuery( termQuery( "groupId", groupId ) ) .execute() .actionGet(); ArrayList<Runner> runners = new ArrayList<Runner>(); for ( SearchHit hit : response.getHits().hits() ) { runners.add( toRunner( hit ) ); } return runners; } @Inject  RunnerDao( IElasticSearchClient elasticSearchClient ); boolean save( Runner runner, String user, String commitId, String moduleId ); List<Runner> getRunners( String user, String commitId, String moduleId ); Map<RunnerGroup, List<Runner>> getRunnersGrouped(); boolean delete( String runnerUrl ); }
RunnerDao extends Dao { public List<Runner> getRunners( String user, String commitId, String moduleId ) { String groupId = new RunnerGroup( user, commitId, moduleId ).getId(); SearchResponse response = getRequest( DAO_INDEX_KEY, DAO_TYPE_KEY ) .setQuery( termQuery( "groupId", groupId ) ) .execute() .actionGet(); ArrayList<Runner> runners = new ArrayList<Runner>(); for ( SearchHit hit : response.getHits().hits() ) { runners.add( toRunner( hit ) ); } return runners; } @Inject  RunnerDao( IElasticSearchClient elasticSearchClient ); boolean save( Runner runner, String user, String commitId, String moduleId ); List<Runner> getRunners( String user, String commitId, String moduleId ); Map<RunnerGroup, List<Runner>> getRunnersGrouped(); boolean delete( String runnerUrl ); static final String DAO_INDEX_KEY; static final String DAO_TYPE_KEY; }