<commit_before>/*
 * (C) Copyright 2016 <NAME> (http://bonigarcia.github.io/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package io.github.bonigarcia.wdm.test;

import static io.github.bonigarcia.wdm.WebDriverManager.chromedriver;
import static org.junit.Assert.assertTrue;

import java.io.File;
import java.net.URL;

import org.junit.Test;

import io.github.bonigarcia.wdm.WebDriverManager;
import io.github.bonigarcia.wdm.WebDriverManagerException;

/**
 * Test for taobao.org mirror.
 *
 * @author <NAME> (<EMAIL>)
 * @since 1.6.1
 */
public class TaobaoTest {

    @Test
    public void testTaobao() throws Exception {
        chromedriver().config().setAvoidAutoVersion(true)
                .setChromeDriverMirrorUrl(
                        new URL("http://npm.taobao.org/mirrors/chromedriver/"));
        chromedriver().useMirror().forceDownload().setup();

        File binary = new File(chromedriver().getBinaryPath());
        assertTrue(binary.exists());
    }

    @Test
    public void testOtherMirrorUrl() throws  Exception {
        chromedriver().config().setAvoidAutoVersion(true)
                .setChromeDriverMirrorUrl(
                        new URL("https://cnpmjs.org/mirrors/chromedriver/"));
        chromedriver().useMirror().forceDownload().setup();<commit_msg>Ignore flaky test due to cnpmjs.org<commit_after>/*
 * (C) Copyright 2016 <NAME> (http://bonigarcia.github.io/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package io.github.bonigarcia.wdm.test;

import static io.github.bonigarcia.wdm.WebDriverManager.chromedriver;
import static org.junit.Assert.assertTrue;

import java.io.File;
import java.net.URL;

import org.junit.Ignore;
import org.junit.Test;

import io.github.bonigarcia.wdm.WebDriverManager;
import io.github.bonigarcia.wdm.WebDriverManagerException;

/**
 * Test for taobao.org mirror.
 *
 * @author <NAME> (<EMAIL>)
 * @since 1.6.1
 */
public class TaobaoTest {

    @Test
    public void testTaobao() throws Exception {
        chromedriver().config().setAvoidAutoVersion(true)
                .setChromeDriverMirrorUrl(
                        new URL("http://npm.taobao.org/mirrors/chromedriver/"));
        chromedriver().useMirror().forceDownload().setup();

        File binary = new File(chromedriver().getBinaryPath());
        assertTrue(binary.exists());
    }

    @Ignore("Flaky test due to cnpmjs.org")
    @Test
    public void testOtherMirrorUrl() throws Exception {
        chromedriver().config().setAvoidAutoVersion(true)
                .setChromeDriverMirrorUrl(
                        new URL("https://cnpmjs.org/mirrors/chromedriver/"));
        chromedriver().useMirror().forceDownload().setup();
{'fraction_non_alphanumeric': 0.11476293103448276, 'fraction_numerical': 0.005926724137931034, 'mean_word_length': 3.287528868360277, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4151726', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1047, 'n_words': 293}