Skip to content
Snippets Groups Projects

drupal-2872694/2872694-database-backends-cannot : Done the reroll.

Open Prem Suthar requested to merge issue/drupal-2872694:2872694-database-backends-cannot into 11.x
4 unresolved threads

Closes #2872694

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • IMMACULATE X added 1 commit

    added 1 commit

    • 1b927018 - Update file DatabaseBackendTest.php

    Compare with previous version

  • Prem Suthar added 1568 commits

    added 1568 commits

    Compare with previous version

  • Prem Suthar added 1 commit

    added 1 commit

    • 0a9bd1dd - Reslove the Thread as per suggestion

    Compare with previous version

  • Prem Suthar resolved all threads

    resolved all threads

  • Prem Suthar added 1 commit

    added 1 commit

    • f8ec1a1a - Try To fix the failed the test case .

    Compare with previous version

  • 55 56 $cid_long = str_repeat('愛€', 500);
    56 57 $cached_value_long = $this->randomMachineName();
    57 58 $backend->set($cid_long, $cached_value_long);
    58 $this->assertSame($cached_value_long, $backend->get($cid_long)->data, "Backend contains the correct value for long, non-ASCII cache id.");
    59 $this->assertSame(
  • 55 56 $cid_long = str_repeat('愛€', 500);
    56 57 $cached_value_long = $this->randomMachineName();
    57 58 $backend->set($cid_long, $cached_value_long);
    58 $this->assertSame($cached_value_long, $backend->get($cid_long)->data, "Backend contains the correct value for long, non-ASCII cache id.");
    59 $this->assertSame(
    60 $cached_value_long,
    61 $backend->get($cid_long)->data,
    62 "Backend contains the correct value for a long, non-ASCII cache ID."
    63 );
    59 64
    60 65 $cid_short = '愛1€';
    61 66 $cached_value_short = $this->randomMachineName();
    62 67 $backend->set($cid_short, $cached_value_short);
    63 $this->assertSame($cached_value_short, $backend->get($cid_short)->data, "Backend contains the correct value for short, non-ASCII cache id.");
    68 $this->assertSame(
  • 69 78 $items["test$i"]['data'] = $i;
    70 79 }
    71 80 $backend->setMultiple($items);
    72 $this->assertSame(DatabaseBackend::MAX_ITEMS_PER_CACHE_SET + 1, $this->getNumRows());
    81
    82 // Assert the correct number of rows in the cache table.
    83 $this->assertSame(
  • 145 // All DatabaseBackend cache tables should be prefixed with 'cache_'. As
    146 // specified on \Drupal\Core\Cache\DatabaseBackend::__construct.
    147 $cid = $this->randomMachineName();
    148
    149 // We insert a corrupted cache item into the cache table.
    150 \Drupal::database()->insert('cache_corrupt')->fields([
    151 'cid' => $cid,
    152 'created' => round(microtime(TRUE), 3),
    153 'data' => substr(serialize($this->randomObject()), 0, -5),
    154 'expire' => CacheBackendInterface::CACHE_PERMANENT,
    155 'tags' => '',
    156 'serialized' => 1,
    157 'checksum' => $cache_tags_checksum->getCurrentChecksum([]),
    158 ])->execute();
    159
    160 $this->assertFalse($corrupt_backend->get($cid), "Returns a FALSE when requesting the corrupt object.");
  • Prem Suthar added 1 commit

    added 1 commit

    • 6e6db6a1 - Revert the Changed appears out of scope code and try to apply the MR Feedback.

    Compare with previous version

  • Prem Suthar added 1 commit

    added 1 commit

    Compare with previous version

  • Prem Suthar added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading