Mercurial > hg
comparison tests/test-bookmarks-pushpull.t @ 25442:9ee395dffac9
test: pull through http when testing for race conditions
The http server is stateless giving more occasion for race. We switch the test
to http before adding extra cases tests.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 01 Jun 2015 17:47:15 -0700 |
parents | 58b766a21189 |
children | b5311068077e |
comparison
equal
deleted
inserted
replaced
25441:58b766a21189 | 25442:9ee395dffac9 |
---|---|
261 | 261 |
262 update a bookmark in the middle of a client pulling changes | 262 update a bookmark in the middle of a client pulling changes |
263 | 263 |
264 $ cd .. | 264 $ cd .. |
265 $ hg clone -q a pull-race | 265 $ hg clone -q a pull-race |
266 $ hg clone -q pull-race pull-race2 | 266 |
267 We want to use http because it is stateless and therefore more susceptible to | |
268 race conditions | |
269 | |
270 $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log | |
271 $ cat pull-race.pid >> $DAEMON_PIDS | |
272 | |
273 $ hg clone -q http://localhost:$HGPORT/ pull-race2 | |
267 $ cd pull-race | 274 $ cd pull-race |
268 $ hg up -q Y | 275 $ hg up -q Y |
269 $ echo c4 > f2 | 276 $ echo c4 > f2 |
270 $ hg ci -Am4 | 277 $ hg ci -Am4 |
271 $ echo c5 > f3 | 278 $ echo c5 > f3 |
272 $ cat <<EOF > .hg/hgrc | 279 $ cat <<EOF > .hg/hgrc |
273 > [hooks] | 280 > [hooks] |
274 > outgoing.makecommit = hg ci -Am5; echo committed in pull-race | 281 > outgoing.makecommit = hg ci -Am5; echo committed in pull-race |
275 > EOF | 282 > EOF |
276 $ cd ../pull-race2 | 283 |
284 (new config needs a server restart) | |
285 | |
286 $ cd .. | |
287 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
288 $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log | |
289 $ cat pull-race.pid >> $DAEMON_PIDS | |
290 $ cd pull-race2 | |
277 $ hg -R $TESTTMP/pull-race book | 291 $ hg -R $TESTTMP/pull-race book |
278 @ 1:0d2164f0ce0d | 292 @ 1:0d2164f0ce0d |
279 X 1:0d2164f0ce0d | 293 X 1:0d2164f0ce0d |
280 * Y 4:b0a5eff05604 | 294 * Y 4:b0a5eff05604 |
281 Z 1:0d2164f0ce0d | 295 Z 1:0d2164f0ce0d |
282 $ hg pull | 296 $ hg pull |
283 pulling from $TESTTMP/pull-race (glob) | 297 pulling from http://localhost:$HGPORT/ |
284 searching for changes | 298 searching for changes |
285 adding f3 | |
286 committed in pull-race | |
287 adding changesets | 299 adding changesets |
288 adding manifests | 300 adding manifests |
289 adding file changes | 301 adding file changes |
290 added 1 changesets with 1 changes to 1 files | 302 added 1 changesets with 1 changes to 1 files |
291 updating bookmark Y | 303 updating bookmark Y |
293 $ hg book | 305 $ hg book |
294 * @ 1:0d2164f0ce0d | 306 * @ 1:0d2164f0ce0d |
295 X 1:0d2164f0ce0d | 307 X 1:0d2164f0ce0d |
296 Y 4:b0a5eff05604 | 308 Y 4:b0a5eff05604 |
297 Z 1:0d2164f0ce0d | 309 Z 1:0d2164f0ce0d |
310 | |
311 (done with this section of the test) | |
312 | |
313 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
298 $ cd ../b | 314 $ cd ../b |
299 | 315 |
300 diverging a remote bookmark fails | 316 diverging a remote bookmark fails |
301 | 317 |
302 $ hg up -q 4e3505fd9583 | 318 $ hg up -q 4e3505fd9583 |