-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 When performing a CDS sync, we write out two CDS events to the mongo DB, "sync_started" and "sync_finished", with the actual sync occuring in between. Then when you get the CDS event history, they are sorted by timestamp (default to descending order).
I have a few unit tests that check to make sure those are present. The tests where sync throws an error are sporadically failing. - From what I can tell, sometimes the history events are being returned with the "sync_finished" occuring before the "sync_started" in the event list. I'm not entirely sure why. When the event is created to be saved, it's setting the timestamp to datetime.datetime.now(). I'm wondering if that's not precise enough to differentiate between two events created in rapid succession, as would occur if that sync call immediately errors out. Is there something better I should be using for the value for the timestamp? I added in a secondary sort by ID. The inserts are done with safe=True, so they should get IDs that will properly reflect their order. I'm hoping that clears it up. If hudson still randomly complains about failures and the error comes from test_cds_api.py, let me know because it's likely this issue. - -- Jay Dobies RHCE# 805008743336126 Freenode: jdob http://pulpproject.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNAVKcAAoJEOMmcTqOSQHCzesIAKYXF9r84XXXNFfsAQi2EMUJ 8B7DL9gKFQxICrvrzUhMAHg7GAwP0C0wlgqnK8wH4yJNk4fVPqyan1JPd4+h0vXn qL6d/c+ZR4ZfSs1ruDlIXFvScjGRzjzA1wwwTMulwKYTx4kTACPtNPxYBFAfvz0r XZdIVAA//5U0auoQrm2PsDeYMzqtyD0DJHjU7vMIo6ePnov6f7azsewX3Wdl23N2 ZDxtBFmeDNx9Vc3VHuTHEZKbd2dmjyEVEJmtOfzLykX1t+d3veJh82mU/ItTh/Lw yHfe9VWBnuu2uQlIlDJ59YwSsyM99JMGXPbdKwxtT4O8r2OIShJ37fY1HiCzeWw= =M/6K -----END PGP SIGNATURE----- _______________________________________________ Pulp-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-list
