Projects:DB Synchronization With Symmetric DS/JMeter Tests
Introduction
The configuration of the tables to be synchronized is donde in the Synchronized Table, available using the System Administrator role.
org.openbravo.retail.storeserver.synchronization.examples module
The org.openbravo.retail.storeserver.synchronization.examples module contains tables required by the jmeter tests to test the synchronization, along with the jmeter tests.
The jmeter tests are placed in the src-test/jmeter-tests of the module. They can be executed either from the JMeter GUI or from the console using a command similar to this one:
jmeter -n -t TriggersAreDisabledDuringSynch.jmx -l /tmp/testOutput.log -JcentralServerURL=localhost -JstoreServerURL=localhost -JcentralServerPort=8090 -JstoreServerPort=8070
The following tests have been defined:
- BasicSynch.jmx: Tests the basic, one-way synchronization
- Creates a record in the central server
- Checks that it is inserted in the store server
- Updates the record in the central server
- Checks that it is updated in the store server
- Deletes the record from the central server
- Check that it is deleted from the store server
- Creates a record in the store server
- Checks that it is not created in the store server
- BidirectionalSynch.jmx: Tests the two-way ssynchronization
- Creates a record in the central server
- Checks that it is inserted in the store server
- Updates the record in the central server
- Checks that it is updated in the store server
- Deletes the record from the central server
- Check that it is deleted from the store server
- Creates a record in the store server
- Checks that is created in the store server
- Updates the record in the store server
- Checks that it is updated in the central server
- Deletes the record from the store server
- Checks that it is deleted from the central server
- PartialSynch.jmx: Tests the partial (only inserts) synchronization, and also excluding columns from the synchronization
- Creates a record in the central server
- Checks that it is inserted in the store server, but that the excluded column has its default value, not the one used to create the record in the central server
- Updates the record in the central server
- Checks that it is not updated in the store server
- Deletes the record from the central server
- Checks that it is not deleted from the central server
- TriggersAreDisabledDuringSynch.jmx: Tests that triggers are disabled during the synchronization
- Creates a record in the central server in a table that has a trigger
- Checks that it is inserted in the store server
- Checks that the trigger has been executed in the central server
- Checks that the trigger has not been executed in the store server
- Creates a record in the same table in the store server
- Checks that the trigger has been executed in the store server
- TestTableReload.jmx: Tests that the reload table process works
- Creates a record in the central server
- Checks that it is inserted in the store server
- Deletes the record from the store server
- Check that it is deleted from the store server
- Schedules in the central server a reload table event for that particular table and that particular store server
- Checks that the record is again inserted in the store server
- TestTableReloadWithWhereClause.jmx: Tests that the reload table process works, providing a where clause to reload only some of the table contents.
- Creates two records in the central server
- Checks that both records are inserted in the store server
- Deletes both records from the store server
- Check that they have been actually deleted from the store server
- Schedules in the central server a reload table event for that particular table and that particular store server, providing a where clause that filters out one of the two created records
- Checks that only one of the records is inserted in the store server