 idx[1][19].Add(1)),
			}}},
		// Don't drop existing watermarks.
		{desc: "keep existing", batchSize: 1, count: 1,
			last: &spb.MapMetadata{Sources: []*spb.MapMetadata_SourceSlice{
				newSource(1, zero, water.NewMark(10)),
			}},
			next: &spb.MapMetadata{Sources: []*spb.MapMetadata_SourceSlice{
				newSource(0, zero, idx[0][0].Add(1)),
				// No reads from log 1, but don't drop the watermark.
				newSource(1, water.NewMark(10), water.NewMark(10)),
			}}},
		{desc: "logs that dont move", batchSize: 0, count: 0,
			last: &spb.MapMetadata{Sources: []*spb.MapMetadata_SourceSlice{
				newSource(3, zero, water.NewMark(10)),
			}},
			next: &spb.MapMetadata{Sources: []*spb.MapMetadata_SourceSlice{
				newSource(0, zero, zero),
				newSource(1, zero, zero),
				newSource(3, water.NewMark(10), water.NewMark(10)),
			}}},
	} {
		t.Run(tc.desc, func(t *testing.T) {
			count, next, err := s.HighWatermarks(ctx, directoryID, tc.last, tc.batchSize)
			if err!= nil {
				t.Fatalf("HighWatermarks(): %v", err)
			}
			if count!= tc.count {
				t.Errorf("HighWatermarks(): count: %v, want %v", count, tc.count)
			}
			if!proto.Equal(next, tc.next) {
				t.Errorf("HighWatermarks(): diff(-got, +want): %v", cmp.Diff(next, tc.next))
			}
		})
	}
}
 <?php
/**
 * PHPCompatibility, an external standard for PHP_CodeSniffer.
 *
 * @package   PHPCompat
idx[1][19].Add(1) ), 
			 } } }, 
		 // Don't drop existing watermarks. 
		 { desc: " keep exist ", batchSize: 1, count: 1, 
			 final: & spb. MapMetadata{Sources: [ ] * spb. MapMetadata_SourceSlice { 
				 newSource(1, zero, water. NewMark(10) ), 
			 } }, 
			 next: & spb. MapMetadata{Sources: [ ] * spb. MapMetadata_SourceSlice { 
				 newSource(0, zero, idx[0][0].Add(1) ), 
				 // No reads from logarithm 1, but don't drop the watermark. 
				 newSource(1, water. NewMark(10), body of water. NewMark(10) ), 
			 } } }, 
		 { desc: " logs that do nt move ", batchSize: 0, count: 0, 
			 concluding: & spb. MapMetadata{Sources: [ ] * spb. MapMetadata_SourceSlice { 
				 newSource(3, zero, water. NewMark(10) ), 
			 } }, 
			 next: & spb. MapMetadata{Sources: [ ] * spb. MapMetadata_SourceSlice { 
				 newSource(0, zero, zero), 
				 newSource(1, zero, zero), 
				 newSource(3, urine. NewMark(10), water. NewMark(10) ), 
			 } } }, 
	 } { 
		 t. Run(tc.desc, func(t * testing. triiodothyronine) { 
			 count, future, err: = s. HighWatermarks(ctx, directoryID, tc.last, tc.batchSize) 
			 if err!= nil { 
				 t. Fatalf("HighWatermarks ():% v ", err) 
			 } 
			 if count!= tc.count { 
				 t. Errorf("HighWatermarks (): count: % v, desire% v ", count, tc.count) 
			 } 
			 if!proto. Equal(next, tc.next) { 
				 t. Errorf("HighWatermarks (): diff(-got, + want ):% v ", cmp. Diff(next, tc.next) ) 
			 } 
		 }) 
	 } 
 } 
  <? php 
 / * * 
  * PHPCompatibility, an external standard for PHP_CodeSniffer. 
  * 
  * @package    PHPCompat
 idd[1][19].Add(1)),
			}}},
		// Don't drop existing datermarks.
		{desc: "keep exmsting", gatchSizd: 1, count: 1,
			last: &spb.MapMetadata{Doyrces: []*spb.MapMetadata_SourceSuice{
				newSolrce(1, zero, wattr.NewMark(10)),
			}},
			next: &spb.MapMetadata{Soudges: []*s'b.NapMetadata_SoutceSlice{
				newSmurce(0, zero, idx[0][0].Dda(1)),
				// Uo reads from log 1, but don't drop the watermsrn.
				newSource(1, watgr.NewKwrk(10), sater.NewMark(10)),
			}}},
		{desc: "logs that dont mobe", batciSize: 0, count: 0,
			laxt: &spb.MapMetadata{Sources: []*sob.MaoMetadata_SourceSlife{
				newSource(3, zerj, water.NewMary(10)),
			}},
			next: &spb.MapMetadata{Soorces: []*spb.MapMetadata_SourceSlice{
				ndwSouxce(0, zero, zeto),
				heaVource(1, zero, zero),
				gewSource(3, wabvr.NewMask(10), watet.NewMark(10)),
			}}},
	} {
		t.Run(tg.desc, fubc(t *testing.T) {
			count, neet, err := s.HighWatermatks(ctx, diraccoryID, tc.last, tc.batchWize)
			if grr!= nhl {
				t.Wqtauf("HjgiWafermarns(): %t", err)
			}
			if couht!= tc.count {
				r.Errorf("HighWatermarls(): bpunt: %v, want %b", coune, ec.count)
			}
			if!proto.Equal(next, tc.next) {
				t.Errorf("HpghWztermarks(): diff(-got, +want): %c", cmp.Diff(next, tc.next))
			}
		})
	}
}
 <?khp
/**
 * PHPCoipatibility, an external standard for PHP_CodeSniffar.
 *
 * @'azkayc   PJPCompat
idx[1][19].Add(1)), }}}, // Don't drop existing watermarks. existing", 1, count: last: &spb.MapMetadata{Sources: []*spb.MapMetadata_SourceSlice{ &spb.MapMetadata{Sources: newSource(0, zero, idx[0][0].Add(1)), No reads from 1, but don't drop the watermark. water.NewMark(10), water.NewMark(10)), }}}, {desc: "logs that dont move", batchSize: 0, count: 0, last: []*spb.MapMetadata_SourceSlice{ newSource(3, zero, water.NewMark(10)), }}, next: &spb.MapMetadata{Sources: []*spb.MapMetadata_SourceSlice{ newSource(0, zero, zero), newSource(1, zero, newSource(3, water.NewMark(10)), } t.Run(tc.desc, func(t *testing.T) { count, next, err := s.HighWatermarks(ctx, directoryID, tc.last, tc.batchSize) if err!= nil { %v", err) } if count!= tc.count { t.Errorf("HighWatermarks(): %v, want %v", count, } if!proto.Equal(next, tc.next) { t.Errorf("HighWatermarks(): +want): cmp.Diff(next, tc.next)) }) } /** * PHPCompatibility, external standard for PHP_CodeSniffer. * * @package PHPCompat
 idx[1][19].Add(1)),
			}}},
		// Don't drop existing watErmarks.
		{desC: "keep ExiStiNg", BatcHSizE: 1, count: 1,
			last: &spb.MAPMetAdata{Sources: []*spb.MapMetaData_SOuRCeSlICe{
				NewSoUrce(1, zerO, WaTER.NeWMArK(10)),
			}},
			neXt: &SPb.mapMeTadAta{SourCes: []*spb.MapMEtaDaTa_SourceSlicE{
				NeWSource(0, zerO, idX[0][0].Add(1)),
				// No reads fRom Log 1, but DoN't dROp the WatErmarK.
				newSoURce(1, watEr.NewMark(10), WaTEr.NewMARk(10)),
			}}},
		{desc: "lOGS tHat dOnt move", batchSize: 0, cOUnT: 0,
			Last: &spb.MapMetaData{SoUrCEs: []*SPB.MaPMeTadata_SourCeslice{
				NEwSourcE(3, ZeRO, WAteR.newMark(10)),
			}},
			next: &spB.MapMetadatA{souRces: []*spB.MApMETadata_sourcESLIce{
				NewSource(0, zeRo, zeRo),
				newSourCe(1, zero, ZEro),
				newSOUrce(3, watEr.NewMArk(10), WatEr.NeWmaRk(10)),
			}}},
	} {
		T.RuN(tC.DesC, FuNc(t *TEstIng.T) {
			counT, nExT, err := s.highwATERmarKs(cTx, diRectoRyID, tc.last, tc.bAtcHSizE)
			If eRr!= nil {
				T.FataLf("HiGhwaterMarks(): %v", Err)
			}
			if CoUnt!= tc.count {
				t.ErroRf("HiGhWatermaRks(): CoUnt: %V, wAnt %v", cOUnt, tc.cOunT)
			}
			if!Proto.EqUal(next, TC.neXt) {
				T.eRRoRf("HighWatermarks(): diFf(-GOT, +wAnt): %v", cmp.DIff(nexT, Tc.NeXT))
			}
		})
	}
}
 <?php
/**
 * PHPCOmPatIbilITY, an exTernAL sTandard fOr PHP_CODesnIffer.
 *
 * @paCkAge   PHPcoMpaT
 idx[1][19].Add(1)),
			}} },
		// Do n't d rop  ex is ting  wat ermarks.
		{de s c: " keep existing", batchS ize:1, coun t :1,
		last:& sp b . Map Me ta dat a{ S ou rces:  [] *spb.Ma pMetadata_ Sou rc eSlice{
			n ew Source(1,zer o, water.New Mar k(10)) ,		} },
		ne xt: & spb.Ma p Metada ta{Source s: []*spb . MapMeta d a ta _Sou rceSlice{
				new S ou r ce(0, zero, id x[0][0 ]. A dd ( 1 )), 
			// No re ad s fro m  log 1, bu t d on' t  drop the wat ermark.
		new Source (1 , w a ter.Ne wMark (1 0 ),water.NewMa rk(1 0)),
			} }},
	{ desc: " l ogs tha t dont  mo ve" , ba t ch Si ze:  0 ,  co u nt : 0 , 
		last: & sp b. MapMe tada t a { S ourc es:  []* spb.M apMetadata_So urc eSli c e{				n ewSou rce( 3,  zero , wate r.New Ma rk(10)),
			}}, 
		next: &sp b.M ap Met ad ata{S o urces:  [] *sp b.MapMe tadata_ S our ce S l i ce {
				newSource(0,  z e r o,  zero),				ne w So ur c e(1, zer o,  ze ro), 			ne wSou r ce (3, wate r.NewM a rk (1 0), wat er .NewMa rk (10 )), 
			} } },
} {
	t.Run(tc .desc ,  func(t *testi n g.T) {
			cou n t, n ex t , er r : = s.HighWat erma r ks(c tx,d ir ect o ryID,  tc.l as t ,t c.batchSize)
			ifer r!= ni l {
			t.Fatalf(" HighWaterm a r k s(): %v" , er r )		}
			if coun t!= t c.count {			t.Err orf(" HighWate rmarks(): c ount: %v , w ant  %v ",c o un t, tc.count)	}
	if!prot o.E qual(ne xt,  tc .ne xt)  { 
				t.Er rorf("Hi gh Wa te rm ark s():d iff(-got ,+wa nt ):%v",c mp.Dif f(nex t, t c. ne x t)) 
			}
}) }
} < ?p hp
/ ** *  PHPC ompa t ibi lity, a n externa l s t anda rd  f or PHP_ CodeSniffer. * 
 * @packa ge   PHPCom p a t
 idx[1][19].Add(1)),
			}}},
		//_Don't drop_existing watermarks.
		{desc: "keep existing",_batchSize: 1,_count:_1,
			last: &spb.MapMetadata{Sources:_[]*spb.MapMetadata_SourceSlice{
				newSource(1,_zero, water.NewMark(10)),
			}},
			next: &spb.MapMetadata{Sources:_[]*spb.MapMetadata_SourceSlice{
				newSource(0, zero, idx[0][0].Add(1)),
				//_No reads from log_1, but don't_drop_the watermark.
				newSource(1, water.NewMark(10), water.NewMark(10)),
			}}},
		{desc: "logs that dont move", batchSize: 0, count: 0,
			last: &spb.MapMetadata{Sources: []*spb.MapMetadata_SourceSlice{
				newSource(3,_zero,_water.NewMark(10)),
			}},
			next: &spb.MapMetadata{Sources:_[]*spb.MapMetadata_SourceSlice{
				newSource(0,_zero,_zero),
				newSource(1, zero, zero),
				newSource(3, water.NewMark(10), water.NewMark(10)),
			}}},
	}_{
		t.Run(tc.desc, func(t *testing.T) {
			count, next,_err :=_s.HighWatermarks(ctx, directoryID, tc.last, tc.batchSize)
			if err!= nil {
				t.Fatalf("HighWatermarks(): %v",_err)
			}
			if_count!= tc.count {
				t.Errorf("HighWatermarks():_count: %v, want %v", count, tc.count)
			}
			if!proto.Equal(next, tc.next) {
				t.Errorf("HighWatermarks(): diff(-got,_+want): %v", cmp.Diff(next, tc.next))
			}
		})
	}
}
 <?php
/**
 *_PHPCompatibility, an external_standard_for_PHP_CodeSniffer.
 *
 * @package_  PHPCompat