Skip to content

not all#16

Open
martalozynska wants to merge 9 commits intotsdaemon:learningfrom
martalozynska:learning
Open

not all#16
martalozynska wants to merge 9 commits intotsdaemon:learningfrom
martalozynska:learning

Conversation

@martalozynska
Copy link
Copy Markdown

No description provided.

{
LessonSignalDto lesson = new LessonSignalDto();
lesson.UserId = (string) element["user_id"];
lesson.Type = SignalTypeUtils.ConvertSlackMessageToSignalType((string) element["signal_type"]);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут конвертація не потрібна, бо ConvertSlackMessageToSignalType потрібен тільки для перетворення даних, які приходять від слеш команди, а не з бази.

public class LessonSignalDto
{
public string UserId { get; set; }
public LessonSignalType Type { get; set; }
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не варто змінювати тут тип.

public class LessonSignalDto
{
public string UserId { get; set; }
public LessonSignalType Type { get; set; }
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Якщо проблема в тому, щоб перетворити int в LessonSignalType, то приведення (LessonSignalType)variable спраює

//TODO: add code to store above values
var newCommand = new MySqlCommand("INSERT INTO lesson_signal (timestamp, signal_type, user_id) VALUES(@0, @1, @2);");
var timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
newCommand.Parameters.AddWithValue("@0",timestamp);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можна передавати прямо дату, mysql розумний, він перетворить сам.

@tsdaemon
Copy link
Copy Markdown
Owner

tsdaemon commented Mar 8, 2018

Дрібні зауваження, чекаю на фікс.

@tsdaemon tsdaemon closed this Mar 8, 2018
@tsdaemon tsdaemon reopened this Mar 15, 2018
@tsdaemon
Copy link
Copy Markdown
Owner

Ваш код не компілюється.

Controllers/LessonSignalEndpointController.cs(78,31): error CS0266: Cannot implicitly convert type 'int' to 'ucubot.Model.LessonSignalType'. An explicit conversion exists (are you missing a cast?) [/app/ucubot.csproj]
Controllers/LessonSignalEndpointController.cs(98,38): error CS1955: Non-invocable member 'DateTime.Now' cannot be used like a method. [/app/ucubot.csproj]
Controllers/LessonSignalEndpointController.cs(100,54): error CS0103: The name 'signalType' does not exist in the current context [/app/ucubot.csproj]
Controllers/LessonSignalEndpointController.cs(101,54): error CS0103: The name 'userId' does not exist in the current context [/app/ucubot.csproj]

@@ -0,0 +1,6 @@
mysql -u root -p
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

це не є частина sql скрипта!

CREATE USER 'martalozynska'@'%' IDENTIFIED BY 'bananaelephant';
GRANT ALL PRIVILEGES ON * . * TO 'martalozynska'@'%';
FLUSH PRIVILEGES;
quit No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

І це також!

@tsdaemon
Copy link
Copy Markdown
Owner

Дивно, але раніше не помічав помилки в вашому скрипті створення бази. Виправіть ASAP.

@tsdaemon tsdaemon closed this Mar 20, 2018
@tsdaemon tsdaemon reopened this Mar 20, 2018
@tsdaemon
Copy link
Copy Markdown
Owner

tsdaemon commented Apr 25, 2018

Марта, знову ви здаєте не протестоване рішення.

db_1    | 2018-04-25T13:33:01.319089Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1    | 2018-04-25T13:33:01.320300Z 0 [Note] mysqld (mysqld 5.7.21) starting as process 1 ...
db_1    | 2018-04-25T13:33:01.324604Z 0 [Note] InnoDB: PUNCH HOLE support available
db_1    | 2018-04-25T13:33:01.324641Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1    | 2018-04-25T13:33:01.324649Z 0 [Note] InnoDB: Uses event mutexes
db_1    | 2018-04-25T13:33:01.324656Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
db_1    | 2018-04-25T13:33:01.324663Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
db_1    | 2018-04-25T13:33:01.324669Z 0 [Note] InnoDB: Using Linux native AIO
db_1    | 2018-04-25T13:33:01.325953Z 0 [Note] InnoDB: Number of pools: 1
db_1    | 2018-04-25T13:33:01.329619Z 0 [Note] InnoDB: Using CPU crc32 instructions
db_1    | 2018-04-25T13:33:01.333424Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1    | 2018-04-25T13:33:01.342375Z 0 [Note] InnoDB: Completed initialization of buffer pool
db_1    | 2018-04-25T13:33:01.345465Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1    | 2018-04-25T13:33:01.368425Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
db_1    | 2018-04-25T13:33:01.371174Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 12318772
db_1    | 2018-04-25T13:33:01.371211Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 12318781
db_1    | 2018-04-25T13:33:01.371218Z 0 [Note] InnoDB: Database was not shutdown normally!
db_1    | 2018-04-25T13:33:01.371224Z 0 [Note] InnoDB: Starting crash recovery.
db_1    | 2018-04-25T13:33:01.549069Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
db_1    | 2018-04-25T13:33:01.549153Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1    | 2018-04-25T13:33:01.549200Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1    | 2018-04-25T13:33:01.818735Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1    | 2018-04-25T13:33:01.821204Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
db_1    | 2018-04-25T13:33:01.821276Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
db_1    | 2018-04-25T13:33:01.822681Z 0 [Note] InnoDB: 5.7.21 started; log sequence number 12318781
db_1    | 2018-04-25T13:33:01.823015Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1    | 2018-04-25T13:33:01.823714Z 0 [Note] Plugin 'FEDERATED' is disabled.
db_1    | 2018-04-25T13:33:01.841141Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
db_1    | 2018-04-25T13:33:01.846842Z 0 [Warning] CA certificate ca.pem is self signed.
db_1    | 2018-04-25T13:33:01.856294Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
db_1    | 2018-04-25T13:33:01.858019Z 0 [Note] IPv6 is available.
db_1    | 2018-04-25T13:33:01.859406Z 0 [Note]   - '::' resolves to '::';
db_1    | 2018-04-25T13:33:01.859452Z 0 [Note] Server socket created on IP: '::'.
db_1    | 2018-04-25T13:33:01.864016Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180425 13:33:01
db_1    | 2018-04-25T13:33:01.875271Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
db_1    | 2018-04-25T13:33:01.876058Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
db_1    | 2018-04-25T13:33:01.998329Z 0 [Note] Event Scheduler: Loaded 0 events
db_1    | 2018-04-25T13:33:01.998652Z 0 [Note] mysqld: ready for connections.
db_1    | Version: '5.7.21'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
app_1   | /usr/share/dotnet/sdk/2.1.104/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(198,5): warning : A PackageReference for 'Microsoft.NETCore.App' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs [/app/ucubot.csproj]
app_1   | /usr/share/dotnet/sdk/2.1.104/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(198,5): warning : A PackageReference for 'Microsoft.NETCore.App' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs [/app/ucubot.csproj]
test_1  | /usr/share/dotnet/sdk/2.1.104/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(198,5): warning : A PackageReference for 'Microsoft.NETCore.App' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs [/app/ucubot/ucubot.csproj]
test_1  | /usr/share/dotnet/sdk/2.1.104/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(198,5): warning : A PackageReference for 'Microsoft.NETCore.App' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs [/app/usubot.End2EndTests/usubot.End2EndTests.csproj]
test_1  |   Restore completed in 96.69 ms for /app/usubot.End2EndTests/usubot.End2EndTests.csproj.
test_1  |   Restore completed in 24.76 ms for /app/ucubot/ucubot.csproj.
test_1  |   Restore completed in 24.78 ms for /app/usubot.End2EndTests/usubot.End2EndTests.csproj.
test_1  | Build started, please wait...
test_1  | /usr/share/dotnet/sdk/2.1.104/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(198,5): warning : A PackageReference for 'Microsoft.NETCore.App' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs [/app/usubot.End2EndTests/usubot.End2EndTests.csproj]
test_1  | /usr/share/dotnet/sdk/2.1.104/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(198,5): warning : A PackageReference for 'Microsoft.NETCore.App' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs [/app/ucubot/ucubot.csproj]
app_1   | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
app_1   |       No XML encryptor configured. Key {ed9277fa-86a7-4b14-b196-7c964e811e17} may be persisted to storage in unencrypted form.
app_1   | Hosting environment: Production
app_1   | Content root path: /app
app_1   | Now listening on: http://[::]:80
app_1   | Application started. Press Ctrl+C to shut down.
test_1  | Controllers/LessonSignalEndpointController.cs(91,42): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [/app/ucubot/ucubot.csproj]
test_1  | Controllers/LessonSignalEndpointController.cs(113,42): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [/app/ucubot/ucubot.csproj]
test_1  |   ucubot -> /app/ucubot/bin/Debug/netcoreapp2.0/ucubot.dll
test_1  |   usubot.End2EndTests -> /app/usubot.End2EndTests/bin/Debug/netcoreapp2.0/usubot.End2EndTests.dll
test_1  | Build completed.
test_1  | 
test_1  | Test run for /app/usubot.End2EndTests/bin/Debug/netcoreapp2.0/usubot.End2EndTests.dll(.NETCoreApp,Version=v2.0)
test_1  | Microsoft (R) Test Execution Command Line Tool Version 15.6.0
test_1  | Copyright (c) Microsoft Corporation.  All rights reserved.
test_1  | 
test_1  | Starting test execution, please wait...
test_1  | NUnit Adapter 3.9.0.0: Test execution started
test_1  | Running all tests in /app/usubot.End2EndTests/bin/Debug/netcoreapp2.0/usubot.End2EndTests.dll
test_1  | NUnit3TestExecutor converted 19 of 19 NUnit test cases
db_1    | 2018-04-25T13:33:22.628131Z 2 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
db_1    | 2018-04-25T13:33:22.628283Z 2 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
app_1   | fail: Microsoft.AspNetCore.Server.Kestrel[13]
app_1   |       Connection id "0HLDAM4ERCA5T", Request id "0HLDAM4ERCA5T:00000002": An unhandled exception was thrown by the application.
app_1   | System.InvalidOperationException: Connection must be valid and open.
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.Throw(Exception ex)
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.CheckState()
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
app_1   |    at ucubot.Controllers.LessonSignalEndpointController.<CreateSignal>d__5.MoveNext() in /app/Controllers/LessonSignalEndpointController.cs:line 106
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at ucubot.Infrastructure.AspNetCoreExtensions.RequestScopingStartupFilter.<<ConfigureRequestScoping>b__3_0>d.MoveNext() in /app/Infrastructure/AspNetCoreExtensions.cs:line 94
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
app_1   | fail: Microsoft.AspNetCore.Server.Kestrel[13]
app_1   |       Connection id "0HLDAM4ERCA5U", Request id "0HLDAM4ERCA5U:00000002": An unhandled exception was thrown by the application.
app_1   | System.InvalidOperationException: Connection must be valid and open.
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.Throw(Exception ex)
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.CheckState()
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
app_1   |    at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
app_1   |    at ucubot.Controllers.LessonSignalEndpointController.<CreateSignal>d__5.MoveNext() in /app/Controllers/LessonSignalEndpointController.cs:line 106
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at ucubot.Infrastructure.AspNetCoreExtensions.RequestScopingStartupFilter.<<ConfigureRequestScoping>b__3_0>d.MoveNext() in /app/Infrastructure/AspNetCoreExtensions.cs:line 94
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
app_1   | --- End of stack trace from previous location where exception was thrown ---
app_1   |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
app_1   |    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
app_1   |    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
test_1  | NUnit Adapter 3.9.0.0: Test execution complete
test_1  | Failed   TestGetCreateGetDeleteGet
test_1  | Error Message:
test_1  |  Expected object to be Accepted, but found InternalServerError.
test_1  | Stack Trace:
test_1  |    at FluentAssertions.Execution.LateBoundTestFramework.Throw(String message)
test_1  |    at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
test_1  |    at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs)
test_1  |    at usubot.End2EndTests.Assignment1Tests.<TestGetCreateGetDeleteGet>d__8.MoveNext() in /app/usubot.End2EndTests/Assignment1Tests.cs:line 126
test_1  | --- End of stack trace from previous location where exception was thrown ---
test_1  |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
test_1  |    at NUnit.Framework.Internal.AsyncInvocationRegion.AsyncTaskInvocationRegion.WaitForPendingOperationsToComplete(Object invocationResult)
test_1  |    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunAsyncTestMethod(TestExecutionContext context)
test_1  | 
test_1  | Failed   TestSqlInjectionFail
test_1  | Error Message:
test_1  |  Expected object to be Accepted, but found InternalServerError.
test_1  | Stack Trace:
test_1  |    at FluentAssertions.Execution.LateBoundTestFramework.Throw(String message)
test_1  |    at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
test_1  |    at FluentAssertions.Primitives.ObjectAssertions.Be(Object expected, String because, Object[] becauseArgs)
test_1  |    at usubot.End2EndTests.Assignment1Tests.<TestSqlInjectionFail>d__9.MoveNext() in /app/usubot.End2EndTests/Assignment1Tests.cs:line 160
test_1  | --- End of stack trace from previous location where exception was thrown ---
test_1  |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
test_1  |    at NUnit.Framework.Internal.AsyncInvocationRegion.AsyncTaskInvocationRegion.WaitForPendingOperationsToComplete(Object invocationResult)
test_1  |    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunAsyncTestMethod(TestExecutionContext context)
test_1  | 
test_1  | Failed   TestNonExistRecordReturns404
test_1  | Error Message:
test_1  |  System.InvalidOperationException : Sequence contains no elements
test_1  | Stack Trace:
test_1  |    at System.Linq.Enumerable.Max(IEnumerable`1 source)
test_1  |    at usubot.End2EndTests.Assignment1Tests.<TestNonExistRecordReturns404>d__10.MoveNext() in /app/usubot.End2EndTests/Assignment1Tests.cs:line 183
test_1  | --- End of stack trace from previous location where exception was thrown ---
test_1  |    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
test_1  |    at NUnit.Framework.Internal.AsyncInvocationRegion.AsyncTaskInvocationRegion.WaitForPendingOperationsToComplete(Object invocationResult)
test_1  |    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunAsyncTestMethod(TestExecutionContext context)
test_1  | 
test_1  | Total tests: 7. Passed: 4. Failed: 3. Skipped: 0.
test_1  | Test Run Failed.
test_1  | Test execution time: 13.0552 Seconds
martalozynska_test_1 exited with code 1

Ставлю вам 10/20.

@martalozynska
Copy link
Copy Markdown
Author

martalozynska commented Apr 25, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants