diff --git a/Dockerfile b/Dockerfile index 3dd086889..b6bd16a42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,49 +3,12 @@ # FROM microsoft/aspnetcore-build:2.0.3-jessie as builder -# Install runtime dependencies -RUN apt-get update \ - && apt-get install -y --no-install-recommends ca-certificates bzip2 libfontconfig \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - # Install official PhantomJS release -RUN set -x \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - && mkdir /srv/var \ - && mkdir /tmp/phantomjs \ - # Download Phantom JS - && curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -xj --strip-components=1 -C /tmp/phantomjs \ - # Copy binaries only - && mv /tmp/phantomjs/bin/phantomjs /usr/local/bin \ - # Create symbol link - # Clean up - && apt-get autoremove -y \ - && apt-get clean all \ - && rm -rf /tmp/* /var/lib/apt/lists/* - -RUN phantomjs --version - -COPY src/Squidex/package.json /tmp/package.json - -# Install Node packages -RUN cd /tmp && npm install - COPY . . WORKDIR / -# Build Frontend -RUN cp -a /tmp/node_modules /src/Squidex/ \ - && cd /src/Squidex \ - && npm run test:coverage \ - && npm run build:copy \ - && npm run build - # Test Backend -RUN dotnet restore \ - && dotnet test tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj \ +RUN dotnet test tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj \ && dotnet test tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj \ && dotnet test tests/Squidex.Domain.Apps.Read.Tests/Squidex.Domain.Apps.Read.Tests.csproj \ && dotnet test tests/Squidex.Domain.Apps.Write.Tests/Squidex.Domain.Apps.Write.Tests.csproj \ diff --git a/src/Squidex.Infrastructure/Tasks/LimitedConcurrencyLevelTaskScheduler.cs b/src/Squidex.Infrastructure/Tasks/LimitedConcurrencyLevelTaskScheduler.cs index 136c0dd9d..347a2d2d2 100644 --- a/src/Squidex.Infrastructure/Tasks/LimitedConcurrencyLevelTaskScheduler.cs +++ b/src/Squidex.Infrastructure/Tasks/LimitedConcurrencyLevelTaskScheduler.cs @@ -75,7 +75,10 @@ namespace Squidex.Infrastructure.Tasks TryExecuteTask(item); } } - finally { currentThreadIsProcessingItems = false; } + finally + { + currentThreadIsProcessingItems = false; + } }, null); } diff --git a/src/Squidex.Infrastructure/Tasks/SingleThreadedDispatcher.cs b/src/Squidex.Infrastructure/Tasks/SingleThreadedDispatcher.cs index 664d6b7bd..222b6ced6 100644 --- a/src/Squidex.Infrastructure/Tasks/SingleThreadedDispatcher.cs +++ b/src/Squidex.Infrastructure/Tasks/SingleThreadedDispatcher.cs @@ -29,52 +29,6 @@ namespace Squidex.Infrastructure.Tasks block = new ActionBlock>(Handle, options); } - public Task DispatchAndUnwrapAsync(Func action) - { - Guard.NotNull(action, nameof(action)); - - var tcs = new TaskCompletionSource(); - - block.SendAsync(async () => - { - try - { - await action(); - - tcs.SetResult(true); - } - catch (Exception ex) - { - tcs.SetException(ex); - } - }); - - return tcs.Task; - } - - public Task DispatchAndUnwrapAsync(Func> action) - { - Guard.NotNull(action, nameof(action)); - - var tcs = new TaskCompletionSource(); - - block.SendAsync(async () => - { - try - { - var result = await action(); - - tcs.SetResult(result); - } - catch (Exception ex) - { - tcs.SetException(ex); - } - }); - - return tcs.Task; - } - public Task DispatchAsync(Func action) { Guard.NotNull(action, nameof(action)); diff --git a/tests/Squidex.Infrastructure.Tests/Tasks/SingleThreadedDispatcherTests.cs b/tests/Squidex.Infrastructure.Tests/Tasks/SingleThreadedDispatcherTests.cs index 88af357a2..5e110745c 100644 --- a/tests/Squidex.Infrastructure.Tests/Tasks/SingleThreadedDispatcherTests.cs +++ b/tests/Squidex.Infrastructure.Tests/Tasks/SingleThreadedDispatcherTests.cs @@ -1,10 +1,10 @@ - //========================================================================== - // SingleThreadedDispatcherTests.cs - // Squidex Headless CMS - //========================================================================== - // Copyright (c) Squidex Group - // All rights reserved. - //========================================================================== +// ========================================================================== +// SingleThreadedDispatcherTests.cs +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex Group +// All rights reserved. +// ========================================================================== using System.Collections.Generic; using System.Linq;