<commit_before>package com.morphiles.delay.repay.api.departures;

import com.morphiles.delay.repay.api.BaseTest;
import com.morphiles.delay.repay.api.service.DelayRepayBot;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.Assert.assertTrue;

/**
 * Created by robevansuk on 03/02/2017.
 */
public class DeparturesTest extends BaseTest {

    static Logger log = LoggerFactory.getLogger(DeparturesTest.class);
    static final int partsOfHour = 4;

    @Autowired
    DelayRepayBot delayRepayBot;

    @Test
    public void checkTrainTimesForMyTrains() {

        long oneHour = 1000 * 60 * 60;
        long nextCheckTime = now() + 0;

        while(true) {
            try {
                int i = 0;
                while (now() < nextCheckTime) {
                    long minsRemaining = (nextCheckTime - now())/ (1000*60);

                    log.info(minsRemaining + " mins until next check");
                    Thread.sleep(oneHour / partsOfHour);
                    i++;
                }
                delayRepayBot.checkTrainDelays("RDT", "STP");
                delayRepayBot.checkTrainDelays("STP", "RDT");
                delayRepayBot.checkTrainDelays("SAC", "STP");
                delayRepayBot.checkTrainDelays("STP", "SAC");
                delayRepayBot.checkDelayedArrivals("RDT", "STP");
                delayRepayBot.checkDelayedArrivals("STP", "RDT");
                delayRepayBot.checkDelayedArrivals("SAC", "STP");
                delayRepayBot.checkDelayedArrivals("STP", "SAC");

                nextCheckTime = now() + oneHour;
            } catch (InterruptedException ex) {
                log.info("Delay Repay Bot Stopped");
                break;
            }
        }
        assertTrue(true);
    }

    public void canGetArrivalsBoard() {
<commit_msg>adding a bit of formatting to make the output slightly clearer<commit_after>package com.morphiles.delay.repay.api.departures;

import com.morphiles.delay.repay.api.BaseTest;
import com.morphiles.delay.repay.api.service.DelayRepayBot;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.Assert.assertTrue;

/**
 * Created by robevansuk on 03/02/2017.
 */
public class DeparturesTest extends BaseTest {

    static Logger log = LoggerFactory.getLogger(DeparturesTest.class);
    static final int partsOfHour = 4;

    @Autowired
    DelayRepayBot delayRepayBot;

    @Test
    public void checkTrainTimesForMyTrains() {

        long oneHour = (1000 * 60 * 60) - 60000;
        long nextCheckTime = now() + 0;

        while(true) {
            try {
                int i = 0;
                long minsRemaining = 0;
                while (now() < nextCheckTime) {
                    minsRemaining = (nextCheckTime - now())/ (1000*60);

                    log.info(minsRemaining + " mins until next check");
                    Thread.sleep(oneHour / partsOfHour);
                    i++;
                }
                log.info("Checking for delays...");
                log.info("*************************************************");
                delayRepayBot.checkTrainDelays("RDT", "STP");
                log.info("*************************************************");
                delayRepayBot.checkTrainDelays("STP", "RDT");
                log.info("*************************************************");
                //delayRepayBot.checkTrainDelays("SAC", "STP");
                //delayRepayBot.checkTrainDelays("STP", "SAC");
                delayRepayBot.checkDelayedArrivals("RDT", "STP");
                log.info("*************************************************");
                delayRepayBot.checkDelayedArrivals("STP", "RDT");

//                delayRepayBot.checkDelayedArrivals("SAC", "STP");
//                delayRepayBot.checkDelayedArrivals("STP", "SAC");

                nextCheckTime = now() + oneHour;
            } catch (InterruptedException ex) {
                log.info("Delay Repay Bot Stopped");
                break;
            }
        }
        assertTrue(true);
    }

    public void canGetArrivalsBoard() {

{'fraction_non_alphanumeric': 0.15398929983717144, 'fraction_numerical': 0.013956734124214934, 'mean_word_length': 2.164091243561442, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4895827', 'n_tokens_mistral': 1331, 'n_tokens_neox': 1217, 'n_words': 228}