[MODCXMOCK-3] Make it possible to load multiple instances of the module Created: 27/Nov/17  Updated: 15/Dec/17  Resolved: 30/Nov/17

Status: Closed
Project: mod-codex-mock
Components: None
Affects versions: None
Fix versions: 0.1.0

Type: New Feature Priority: P3
Reporter: Heikki Levanto Assignee: Heikki Levanto
Resolution: Done Votes: 0
Labels: core, sprint27
Remaining Estimate: Not Specified
Time Spent: 1 day, 3 hours
Original estimate: Not Specified

Sprint:

 Comments   
Comment by Heikki Levanto [ 27/Nov/17 ]

Need separate ModuleDescriptors, and the interfaces declared as multiple

Comment by Heikki Levanto [ 27/Nov/17 ]

Add a command-line switch to define a name or number for the instance, use that in the UUIDs in the test data, and a few other places.

Comment by Heikki Levanto [ 27/Nov/17 ]

There may be some problems with the database, if I have two separate modules running. Even the embedded PG will not be totally private for the module, the first started PG instance wins.

Comment by Heikki Levanto [ 29/Nov/17 ]

Yes, it seems that both instances run against the same database, and preload the same data in it.

I think I can live with this, if I use carefully selected UUIDs and fake some query manipulation, so that one instance only returns UUIDs that start with '0' or '1', and the other returns instances that start with '0' or '2'.

Comment by Heikki Levanto [ 29/Nov/17 ]

Added some very synthetic records, and stole two realistic ones from https://github.com/folio-org/mod-inventory-storage/tree/master/sample-data/instances. Seems to work

Generated at Thu Feb 08 22:26:36 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.