Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Test failures with Kernel::System::GenericInterface::Webservice #154

Closed
bschmalhofer opened this issue Jul 7, 2020 · 3 comments
Closed
Assignees
Labels
bug Something isn't working as intended
Milestone

Comments

@bschmalhofer
Copy link
Contributor

For example:

scripts/test/DynamicField/Driver/WebService/PossibleValuesGet.t .................................. 
ok 1 - Created test user 18
ok 2 - Added test user test9050002509000002 to group admin
ok 3 - Added test user test9050002509000002 to group users
ok 4 - Set user UserLanguage to en
ok 5 - TicketCreate() Ticket 1 53
ok 6 - TicketCreate() Ticket 2 54
ok 7 - WebserviceAdd WebService 8
ok 8 - Updated Webservice 8 - TestWebservicetest9050002509100000
ok 9 - DynamicFieldAdd() ID 39
ok 10 - State/Queue Ticket 1 Updated Webservice 8 - TestWebservicetest9050002509100000
not ok 11 - State/Queue Ticket 1 PossibleValuesGet() result (is not equal, see below)
Diff:
+--+-------------+--+---------------------+
|  |Actual data  |  |Expected data        |
+--+-------------+--+---------------------+
* 1|$VAR1 = {};  * 1|$VAR1 = {            *
|  |             * 2|  'Queue' => 'Raw',  *
|  |             * 3|  'State' => 'new'   *
|  |             * 4|};                   *
+--+-------------+--+---------------------+

Actual data:
$VAR1 = {};

Expected data:
$VAR1 = {
  'Queue' => 'Raw',
  'State' => 'new'
};
ok 12 - State/Queue Ticket 2 Updated Webservice 8 - TestWebservicetest9050002509100000
@bschmalhofer bschmalhofer added the bug Something isn't working as intended label Jul 7, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Jul 7, 2020
@bschmalhofer bschmalhofer self-assigned this Jul 7, 2020
@bschmalhofer
Copy link
Contributor Author

It looks like the Webserver is hit with Requests like http://localhost:5000/otobo//nph-genericinterface.pl. Note the double // Supporting the //fixes propably the immediate problem.

But another issue might be that Proxies discard the douple // . In this case functionality might be lost. More Testing is needed.

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Jul 7, 2020

The first guess did not work out. Now let's ponder another idea. On observation is that some of the test cases sometimes work. Maybe it's not a general prolem, but a problem with timing. The test script changes the Configuration by writing small .pm files into Kernel/Config/Files. This causes the Gazelle Webserver to restart and this takes some time.

TODO:

  • instead of restarting Gazelle, do something similar to Apache::Reload, even though this is nasty

bschmalhofer added a commit that referenced this issue Jul 8, 2020
bschmalhofer added a commit that referenced this issue Jul 8, 2020
This happened to work in OTOBO under Apache.
bschmalhofer added a commit that referenced this issue Jul 8, 2020
bschmalhofer added a commit that referenced this issue Jul 8, 2020
Mention that it is guaranteed that the new config is picked up.
bschmalhofer added a commit that referenced this issue Jul 8, 2020
…e.pl

Works only coincidentally under Apache.
bschmalhofer added a commit that referenced this issue Jul 8, 2020
Frequent restarts don't work well with the unit tests.
bschmalhofer added a commit that referenced this issue Jul 8, 2020
Checking %INC every 10 seconds might be good enough
bschmalhofer added a commit that referenced this issue Jul 8, 2020
Compile.t was already added in PR for #154
@bschmalhofer
Copy link
Contributor Author

The trick was to remove the -R Kernel when calling plackup.
Looks good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

1 participant