Currently, this test passes in Jenkins, but not with Travis
CI's hhvm where apparently code execution is slower so not
all UIDs are created within the same millisecond. This also
previously masked that the test did not indeed test if the
host bits are identical as instead it tested the MSBs twice.
Bug: 73668
Change-Id: Ic68af599599ace5faa6a687d115d2d3802f6ba1b
$lastId_bin = wfBaseConvert( $lastId, 10, 2 );
$this->assertGreaterThanOrEqual(
$lastId_bin = wfBaseConvert( $lastId, 10, 2 );
$this->assertGreaterThanOrEqual(
- substr( $id_bin, 0, $tbits ),
substr( $lastId_bin, 0, $tbits ),
substr( $lastId_bin, 0, $tbits ),
+ substr( $id_bin, 0, $tbits ),
"New ID timestamp ($id_bin) >= prior one ($lastId_bin)." );
if ( $hostbits ) {
$this->assertEquals(
"New ID timestamp ($id_bin) >= prior one ($lastId_bin)." );
if ( $hostbits ) {
$this->assertEquals(
- substr( $id_bin, 0, -$hostbits ),
- substr( $lastId_bin, 0, -$hostbits ),
+ substr( $id_bin, -$hostbits ),
+ substr( $lastId_bin, -$hostbits ),
"Host ID of ($id_bin) is same as prior one ($lastId_bin)." );
}
"Host ID of ($id_bin) is same as prior one ($lastId_bin)." );
}