<commit_before>@SET HZ_BIT_VERSION=%1
@SET HZ_LIB_TYPE=%2
@SET HZ_BUILD_TYPE=%3

@SET BUILD_DIR=build%HZ_LIB_TYPE%%HZ_BIT_VERSION%%HZ_BUILD_TYPE%

@SET EXECUTABLE_NAME=clientTest_%HZ_LIB_TYPE%_%HZ_BIT_VERSION%.exe

@echo HZ_BIT_VERSION=%HZ_BIT_VERSION%
@echo HZ_LIB_TYPE=%HZ_LIB_TYPE%
@echo HZ_BUILD_TYPE=%HZ_BUILD_TYPE%
@echo BUILD_DIR=%BUILD_DIR%
@echo EXECUTABLE_NAME=%EXECUTABLE_NAME%

@REM Let the submodule code be downloaded
git submodule update --init

RD /S /Q %BUILD_DIR%
mkdir %BUILD_DIR%

cd %BUILD_DIR%

if %HZ_BIT_VERSION% == 32 (
    set BUILDFORPLATFORM="win32"
    set SOLUTIONTYPE="Visual Studio 12"
) else (
    set BUILDFORPLATFORM="x64"
    set SOLUTIONTYPE="Visual Studio 12 Win64"
)

echo "Generating the solution files for compilation"
cmake .. -G %SOLUTIONTYPE% -DHZ_LIB_TYPE=%HZ_LIB_TYPE% -DHZ_BIT=%HZ_BIT_VERSION% -DCMAKE_BUILD_TYPE=%HZ_BUILD_TYPE% -DHZ_BUILD_TESTS=ON -DHZ_BUILD_EXAMPLES=ON

echo "Building for platform %BUILDFORPLATFORM%"

MSBuild.exe HazelcastClient.sln /m /p:Flavor=%HZ_BUILD_TYPE%;Configuration=%HZ_BUILD_TYPE%;VisualStudioVersion=12.0;Platform=%BUILDFORPLATFORM%;PlatformTarget=%BUILDFORPLATFORM% || exit /b 1

cd ..
cd java

echo "Compiling the java test server"
call mvn -U clean install

call taskkill /F /FI "WINDOWTITLE eq cpp-java"

echo "Starting the java test server"
start "cpp-java" mvn package exec:java -Dexec.mainClass="CppClientListener"

SET DEFAULT_TIMEOUT=30
SET SERVER_PORT=6543

SET timeout=%DEFAULT_TIMEOUT%

echo "Waiting for the test server to start. Timeout: %timeout% seconds"

:loop
    netstat -an  | findstr /C::%SERVER_PORT%
    if %errorlevel% == 0 (
        set /a remainingTime = %DEFAULT_TIMEOUT% - %timeout%
        echo "Server started in %remainingTime% seconds"
        goto server_started
    ) else (
        set /a timeout-=1

        if %timeout% gtr 0 (
            echo "Sleeping 1 second. Remaining %timeout% seconds"
            ping 1.1.1.1 -n 1 -w 1000 >NUL
            goto loop
        ) else (
            goto server_failed_to_start
        )
    )

:server_failed_to_start
echo "The test server did not start in %DEFAULT_TIMEOUT% seconds. Test FAILED."
call taskkill /F /FI "WINDOWTITLE eq cpp-java"
exit /b 1

:server_started

cd ..<commit_msg>Fixes the sleep problem in windows test script while starting the server.  (#167)<commit_after>@SET HZ_BIT_VERSION=%1
@SET HZ_LIB_TYPE=%2
@SET HZ_BUILD_TYPE=%3

@SET BUILD_DIR=build%HZ_LIB_TYPE%%HZ_BIT_VERSION%%HZ_BUILD_TYPE%

@SET EXECUTABLE_NAME=clientTest_%HZ_LIB_TYPE%_%HZ_BIT_VERSION%.exe

@echo HZ_BIT_VERSION=%HZ_BIT_VERSION%
@echo HZ_LIB_TYPE=%HZ_LIB_TYPE%
@echo HZ_BUILD_TYPE=%HZ_BUILD_TYPE%
@echo BUILD_DIR=%BUILD_DIR%
@echo EXECUTABLE_NAME=%EXECUTABLE_NAME%

@REM Let the submodule code be downloaded
git submodule update --init

RD /S /Q %BUILD_DIR%
mkdir %BUILD_DIR%

cd %BUILD_DIR%

if %HZ_BIT_VERSION% == 32 (
    set BUILDFORPLATFORM="win32"
    set SOLUTIONTYPE="Visual Studio 12"
) else (
    set BUILDFORPLATFORM="x64"
    set SOLUTIONTYPE="Visual Studio 12 Win64"
)

echo "Generating the solution files for compilation"
cmake .. -G %SOLUTIONTYPE% -DHZ_LIB_TYPE=%HZ_LIB_TYPE% -DHZ_BIT=%HZ_BIT_VERSION% -DCMAKE_BUILD_TYPE=%HZ_BUILD_TYPE% -DHZ_BUILD_TESTS=ON -DHZ_BUILD_EXAMPLES=ON

echo "Building for platform %BUILDFORPLATFORM%"

MSBuild.exe HazelcastClient.sln /m /p:Flavor=%HZ_BUILD_TYPE%;Configuration=%HZ_BUILD_TYPE%;VisualStudioVersion=12.0;Platform=%BUILDFORPLATFORM%;PlatformTarget=%BUILDFORPLATFORM% || exit /b 1

cd ..
cd java

echo "Compiling the java test server"
call mvn -U clean install

call taskkill /F /FI "WINDOWTITLE eq cpp-java"

echo "Starting the java test server"
start "cpp-java" mvn package exec:java -Dexec.mainClass="CppClientListener"

SET DEFAULT_TIMEOUT=30
SET SERVER_PORT=6543

SET timeout=%DEFAULT_TIMEOUT%

echo "Waiting for the test server to start. Timeout: %timeout% seconds"

:loop
    netstat -an  | findstr /C::%SERVER_PORT%
    if %errorlevel% == 0 (
        set /a remainingTime = DEFAULT_TIMEOUT - timeout
        echo "Server started in %remainingTime% seconds"
        goto server_started
    ) else (
        set /a timeout-=1

        if %timeout% gtr 0 (
            echo "Sleeping 1 second. Remaining %timeout% seconds"
            CHOICE /c x /D x /T 1 > NUL
            goto loop
        ) else (
            goto server_failed_to_start
        )
    )

:server_failed_to_start
echo "The test server did not start in %DEFAULT_TIMEOUT% seconds. Test FAILED."
call taskkill /F /FI "WINDOWTITLE eq cpp-java"
exit /b 1

:server_started

cd ..
{'fraction_non_alphanumeric': 0.0988359323522952, 'fraction_numerical': 0.01603338458159455, 'mean_word_length': 4.157417893544734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3918605', 'n_tokens_mistral': 1749, 'n_tokens_neox': 1645, 'n_words': 425}