Fossil SCM
Add a 1.2 sec delay before the test wiki-30 because it explicitly uses the current date and time, and other changes made to technotes implicitly use the current time, causing a technote name collision if the test script happens to execute with the relevent bits happening within the same wall clock second, at least on Windows. This is partly a kludge to make this test case pass reliably. It would probably be better for test cases to not have more than one reference to 'now' in a way that would cause a name collision, that is worth further investigation. Also, at first glance it doesn't look like the suite actually created to technotes at the same second, but rather it was one of the edits to an older technote that is causing the collision.
rberteig
2016-03-23 21:19
Commit
c29c75c938f9c0002ee8effffe7d67a68e8b0877
Parent
f7513f874964e4a…
1 file changed
+1
+1
| --- test/wiki.test | ||
| +++ test/wiki.test | ||
| @@ -157,10 +157,11 @@ | ||
| 157 | 157 | fossil wiki create technotenow f7 --technote {2016-01-04 12:34:56+00:00} |
| 158 | 158 | test wiki-29 {$CODE == 0} |
| 159 | 159 | |
| 160 | 160 | ############################################################################### |
| 161 | 161 | # Check a technote appears on the timeline |
| 162 | +after 1200 | |
| 162 | 163 | write_file f8 "Contents of a 'unique' tech note" |
| 163 | 164 | fossil wiki create {Unique technote} f8 --technote now |
| 164 | 165 | fossil timeline |
| 165 | 166 | test wiki-30 {[string match *Unique*technote* [second_data_line]]} |
| 166 | 167 | |
| 167 | 168 |
| --- test/wiki.test | |
| +++ test/wiki.test | |
| @@ -157,10 +157,11 @@ | |
| 157 | fossil wiki create technotenow f7 --technote {2016-01-04 12:34:56+00:00} |
| 158 | test wiki-29 {$CODE == 0} |
| 159 | |
| 160 | ############################################################################### |
| 161 | # Check a technote appears on the timeline |
| 162 | write_file f8 "Contents of a 'unique' tech note" |
| 163 | fossil wiki create {Unique technote} f8 --technote now |
| 164 | fossil timeline |
| 165 | test wiki-30 {[string match *Unique*technote* [second_data_line]]} |
| 166 | |
| 167 |
| --- test/wiki.test | |
| +++ test/wiki.test | |
| @@ -157,10 +157,11 @@ | |
| 157 | fossil wiki create technotenow f7 --technote {2016-01-04 12:34:56+00:00} |
| 158 | test wiki-29 {$CODE == 0} |
| 159 | |
| 160 | ############################################################################### |
| 161 | # Check a technote appears on the timeline |
| 162 | after 1200 |
| 163 | write_file f8 "Contents of a 'unique' tech note" |
| 164 | fossil wiki create {Unique technote} f8 --technote now |
| 165 | fossil timeline |
| 166 | test wiki-30 {[string match *Unique*technote* [second_data_line]]} |
| 167 | |
| 168 |