<commit_before>package org.eclipse.scanning.test.event.queues.mocks;

import java.util.List;

import org.eclipse.scanning.api.IScannable;
import org.eclipse.scanning.api.points.IPosition;
import org.eclipse.scanning.api.scan.ScanningException;
import org.eclipse.scanning.api.scan.event.IPositionListener;
import org.eclipse.scanning.api.scan.event.IPositioner;

public class MockPositioner implements IPositioner {
	
	private IPosition pos;
	private boolean aborted = false;
	private Boolean moveComplete;

	@Override
	public void addPositionListener(IPositionListener listener) {
		// TODO Auto-generated method stub

	}

	@Override
	public void removePositionListener(IPositionListener listener) {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean setPosition(IPosition position) throws ScanningException,
			InterruptedException {
		
		moveComplete = false;
		Thread.sleep(100);
		
		//This is to test positioning failing.
		if (position.getNames().contains("BadgerApocalypseButton") && position.get("BadgerApocalypseButton").equals("pushed")) {
			throw new ScanningException("The badger apocalypse cometh! (EXPECTED - we pressed the button...)");
		}
		
		pos = position;
		Thread.sleep(150);
		
		moveComplete = true;
		return true;
	}

	@Override
	public IPosition getPosition() throws ScanningException {<commit_msg>Increases sleep on MockPositioner, since this seems to be stopping a test passing.<commit_after>package org.eclipse.scanning.test.event.queues.mocks;

import java.util.List;

import org.eclipse.scanning.api.IScannable;
import org.eclipse.scanning.api.points.IPosition;
import org.eclipse.scanning.api.scan.ScanningException;
import org.eclipse.scanning.api.scan.event.IPositionListener;
import org.eclipse.scanning.api.scan.event.IPositioner;

public class MockPositioner implements IPositioner {
	
	private IPosition pos;
	private boolean aborted = false;
	private Boolean moveComplete;

	@Override
	public void addPositionListener(IPositionListener listener) {
		// TODO Auto-generated method stub

	}

	@Override
	public void removePositionListener(IPositionListener listener) {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean setPosition(IPosition position) throws ScanningException,
			InterruptedException {
		
		moveComplete = false;
		Thread.sleep(100);
		
		//This is to test positioning failing.
		if (position.getNames().contains("BadgerApocalypseButton") && position.get("BadgerApocalypseButton").equals("pushed")) {
			throw new ScanningException("The badger apocalypse cometh! (EXPECTED - we pressed the button...)");
		}
		
		pos = position;
		Thread.sleep(250);
		
		moveComplete = true;
		return true;
	}

	@Override
	public IPosition getPosition() throws ScanningException {
{'fraction_non_alphanumeric': 0.09430540442509974, 'fraction_numerical': 0.004352557127312296, 'mean_word_length': 4.918454935622318, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4159133', 'n_tokens_mistral': 878, 'n_tokens_neox': 776, 'n_words': 194}