<commit_before>package instep.util

import org.testng.annotations.Test


class LongIdGeneratorTest {
    @Test
    fun g() {
        val idGenerator = LongIdGenerator(0)

        var counter = 0
        val ts = System.currentTimeMillis()
        while (System.currentTimeMillis() - ts < 1000) {
            counter += 1
            println(idGenerator.generate())
        }

        println(counter)
    }
}<commit_msg>add unittest for id generator's maxWorkerId.<commit_after>package instep.util

import org.testng.annotations.Test


class LongIdGeneratorTest {
    @Test
    fun g() {
        val idGenerator = LongIdGenerator(0)

        var counter = 0
        val ts = System.currentTimeMillis()
        while (System.currentTimeMillis() - ts < 1000) {
            counter += 1
            println(idGenerator.generate())
        }

        println(counter)
    }

    @Test
    fun maxWorkerId() {
        val idGenerator = LongIdGenerator(0)

        assert(idGenerator.maxWorkerId == 4095)
    }
}
{'fraction_non_alphanumeric': 0.09443339960238568, 'fraction_numerical': 0.018886679920477135, 'mean_word_length': 2.1666666666666665, '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': '252353', 'n_tokens_mistral': 309, 'n_tokens_neox': 283, 'n_words': 65}