<commit_before>package aho.uozu.yakbox.tests;

import android.os.SystemClock;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;

import java.util.Random;

import aho.uozu.android.audio.AudioBuffer;
import aho.uozu.android.audio.AudioRecorder;
import aho.uozu.yakbox.LoadActivity;

/**
 * Try to cause audio errors by thrashing the audio system.
 * Required since there is at least one hard to reproduce bug
 * that sometimes causes AudioRecord to fail to initialise,
 * and then continue to fail until an OS restart.
 *
 * LoadActivity is used, since it doesn't grab audio resources
 * that I want to test.
 */
public class AudioBreaker
        extends ActivityInstrumentationTestCase2<LoadActivity> {

    private AudioRecorder mAudioRecorder;
    private AudioBuffer mAudioBuffer;
    private Random mRandom;

    private static final int MAX_RECORD_TIME_S = 5;
    private static final int TEST_ITERATIONS = 100;
    private static final String TAG = "AudioBreaker";

    public AudioBreaker() {
        super(LoadActivity.class);
    }

    @Override
    protected void setUp() throws Exception {<commit_msg>update audiobreaker test max record time<commit_after>package aho.uozu.yakbox.tests;

import android.os.SystemClock;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;

import java.util.Random;

import aho.uozu.android.audio.AudioBuffer;
import aho.uozu.android.audio.AudioRecorder;
import aho.uozu.yakbox.LoadActivity;

/**
 * Try to cause audio errors by thrashing the audio system.
 * Required since there is at least one hard to reproduce bug
 * that sometimes causes AudioRecord to fail to initialise,
 * and then continue to fail until an OS restart.
 *
 * LoadActivity is used, since it doesn't grab audio resources
 * that I want to test.
 */
public class AudioBreaker
        extends ActivityInstrumentationTestCase2<LoadActivity> {

    private AudioRecorder mAudioRecorder;
    private AudioBuffer mAudioBuffer;
    private Random mRandom;

    private static final int MAX_RECORD_TIME_S = 20;
    private static final int TEST_ITERATIONS = 100;
    private static final String TAG = "AudioBreaker";

    public AudioBreaker() {
        super(LoadActivity.class);
    }

    @Override
    protected void setUp() throws Exception {
{'fraction_non_alphanumeric': 0.06666666666666667, 'fraction_numerical': 0.005627705627705628, 'mean_word_length': 4.090308370044053, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6271622', 'n_tokens_mistral': 667, 'n_tokens_neox': 644, 'n_words': 223}